# SurfaceEntityTester

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

*** ** * ** ***


```
class SurfaceEntityTester
```

<br />

*** ** * ** ***

A test-only accessor for `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity` that enables direct manipulation and inspection of its internal 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/SurfaceEntityTester#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/SurfaceEntityTester#hashCode()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/PerceivedResolutionResult` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SurfaceEntityTester#perceivedResolutionResult()` Configures the perceived resolution of the entity, to be retrieved by `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity#getPerceivedResolution(androidx.xr.arcore.RenderViewpoint)`. |
| `https://developer.android.com/reference/android/view/Surface.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SurfaceEntityTester#surface()` The `https://developer.android.com/reference/android/view/Surface.html` used by the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity`. |

## Public functions

### equals

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

### hashCode

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

## Public properties

### perceivedResolutionResult

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

```
var perceivedResolutionResult: PerceivedResolutionResult
```

Configures the perceived resolution of the entity, to be retrieved by `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity#getPerceivedResolution(androidx.xr.arcore.RenderViewpoint)`.

Note: Unlike the real `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity#getPerceivedResolution(androidx.xr.arcore.RenderViewpoint)` method, the value returned by this getter is independent of any specific viewpoint or scene pose. It simply returns the last value that was set via this property.

### surface

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

```
var surface: Surface
```

The `https://developer.android.com/reference/android/view/Surface.html` used by the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity`.

Setting this property replaces the current `https://developer.android.com/reference/android/view/Surface.html` associated with the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity`. In this testing implementation, the `https://developer.android.com/reference/android/view/Surface.html` can be set at any time and can be retrieved by calling `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity#getSurface()`. This allows tests to provide a specific `https://developer.android.com/reference/android/view/Surface.html` instance (such as one connected to a test-controlled producer) to verify rendering behavior.