# InteractableComponentTester

Artifact: [androidx.xr.scenecore:scenecore-testing](https://developer.android.com/jetpack/androidx/releases/xr-scenecore) [View Source](https://cs.android.com/search?q=file:androidx/xr/scenecore/testing/InteractableComponentTester.kt+class:androidx.xr.scenecore.testing.InteractableComponentTester) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

*** ** * ** ***


```
public final class InteractableComponentTester
```

<br />

*** ** * ** ***

A test-only accessor for `https://developer.android.com/reference/androidx/xr/scenecore/InteractableComponent` that enables direct manipulation and inspection of its internal state.

## Summary

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/InteractableComponentTester#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `int` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/InteractableComponentTester#hashCode()()` |
| `final void` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/InteractableComponentTester#triggerOnInputEvent(androidx.xr.scenecore.InputEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/InputEvent inputEvent)` Simulates an input event from the runtime, notifying the listener registered via `https://developer.android.com/reference/androidx/xr/scenecore/InteractableComponent.Companion#create(androidx.xr.scenecore.runtime.SceneRuntime,androidx.xr.scenecore.EntityRegistry,java.util.concurrent.Executor,java.util.function.Consumer)`. |

## Public methods

### equals

```
public boolean equals(Object other)
```

### hashCode

```
public int hashCode()
```

### triggerOnInputEvent

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final void triggerOnInputEvent(@NonNull InputEvent inputEvent)
```

Simulates an input event from the runtime, notifying the listener registered via `https://developer.android.com/reference/androidx/xr/scenecore/InteractableComponent.Companion#create(androidx.xr.scenecore.runtime.SceneRuntime,androidx.xr.scenecore.EntityRegistry,java.util.concurrent.Executor,java.util.function.Consumer)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/InputEvent inputEvent` | The `https://developer.android.com/reference/androidx/xr/scenecore/InputEvent` to be triggered. |