# BoundsComponentTester

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/BoundsComponentTester.kt+class:androidx.xr.scenecore.testing.BoundsComponentTester) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

*** ** * ** ***


```
public final class BoundsComponentTester
```

<br />

*** ** * ** ***

A test data accessor for a `https://developer.android.com/reference/androidx/xr/scenecore/BoundsComponent` to inspect and manipulate underlying fake data.

In a test environment, each entity created via `https://developer.android.com/reference/androidx/xr/scenecore/BoundsComponent.Companion#create(androidx.xr.scenecore.runtime.SceneRuntime,java.util.concurrent.Executor,java.util.function.BiConsumer)` is backed by corresponding fake data in the fake runtime. This class provides a way to bridge the public `https://developer.android.com/reference/androidx/xr/scenecore/BoundsComponent` API with its internal fake state.

## Summary

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/BoundsComponentTester#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `int` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/BoundsComponentTester#hashCode()()` |
| `final void` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/BoundsComponentTester#triggerOnBoundsUpdate(androidx.xr.runtime.math.BoundingBox)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/BoundingBox boundingBox)` Simulates a bounds update event from the runtime, notifying all registered listeners. |

## Public methods

### equals

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

### hashCode

```
public int hashCode()
```

### triggerOnBoundsUpdate

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

```
public final void triggerOnBoundsUpdate(@NonNull BoundingBox boundingBox)
```

Simulates a bounds update event from the runtime, notifying all registered listeners.

This triggers callbacks registered via `https://developer.android.com/reference/androidx/xr/scenecore/BoundsComponent#addBoundsUpdateListener(java.util.concurrent.Executor,java.util.function.BiConsumer)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/BoundingBox boundingBox` | The new `https://developer.android.com/reference/androidx/xr/runtime/math/BoundingBox`. |