# 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)

*** ** * ** ***


```
class BoundsComponentTester
```

<br />

*** ** * ** ***

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

In a test environment, each entity created via `https://developer.android.com/reference/kotlin/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/kotlin/androidx/xr/scenecore/BoundsComponent` API with its internal fake state.

## Summary

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/BoundsComponentTester#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/BoundsComponentTester#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/BoundsComponentTester#triggerOnBoundsUpdate(androidx.xr.runtime.math.BoundingBox)(boundingBox: https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/BoundingBox)` Simulates a bounds update event from the runtime, notifying all registered listeners. |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### triggerOnBoundsUpdate

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

```
fun triggerOnBoundsUpdate(boundingBox: BoundingBox): Unit
```

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

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

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