object FakeCameraIds


Utility for tracking and generating fake CameraId instances for testing.

Generated camera IDs are prefixed with "FakeCamera-" to ensure they are non-numerical. This helps identify code that incorrectly assumes camera IDs are parsable as integers (e.g., assuming camera ID "0" can be parsed to 0).

Summary

Public functions

CameraId

Generates a new, unique fake CameraId.

Public properties

CameraId

A default fake CameraId instance ("FakeCamera-default").

Public functions

next

Added in 1.7.0-alpha03
fun next(): CameraId

Generates a new, unique fake CameraId.

The generated ID will have the format "FakeCamera-{index}", where index is a monotonically increasing integer starting from 0.

Returns
CameraId

A unique CameraId instance.

Public properties

default

Added in 1.7.0-alpha03
val defaultCameraId

A default fake CameraId instance ("FakeCamera-default").

Use this when a test only needs a single camera ID and uniqueness across different components is not required.