Skip to content

Add setSystemConstraints and setCurrentCameraState to FakeCameraSystem#524

Merged
temcguir merged 1 commit into
mainfrom
temcguir/update_fake_camera_system
May 29, 2026
Merged

Add setSystemConstraints and setCurrentCameraState to FakeCameraSystem#524
temcguir merged 1 commit into
mainfrom
temcguir/update_fake_camera_system

Conversation

@temcguir
Copy link
Copy Markdown
Collaborator

Added setCurrentCameraState and setSystemConstraints test-only methods to FakeCameraSystem to allow for manipulating state flow easily. Updated FakeCameraSystemTest to cover these two new methods, and included KDocs as per the style guide.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds test-only helper methods (setCurrentCameraState and setSystemConstraints) to FakeCameraSystem to allow manipulating the camera state and system constraints during testing, along with corresponding unit tests in FakeCameraSystemTest. The review feedback identifies that assertThat is used in the new tests without being statically imported or qualified with Truth., which will cause compilation errors, and suggests qualifying them as Truth.assertThat to align with the existing codebase style.

@temcguir temcguir force-pushed the temcguir/update_fake_camera_system branch from f321bf4 to 6b93f07 Compare May 28, 2026 23:37
@temcguir
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds test-only helper methods (setCurrentCameraState and setSystemConstraints) to FakeCameraSystem to allow manual manipulation of the camera state and system constraints during testing, along with corresponding unit tests. The review feedback suggests removing redundant advanceUntilIdle() calls in the new tests, as MutableStateFlow updates synchronously and does not require waiting for coroutine dispatchers.

- Added setCurrentCameraState and setSystemConstraints test-only methods to FakeCameraSystem to allow for manipulating state flow easily.

- Updated FakeCameraSystemTest to cover these two new methods.

- Included KDocs as per the style guide.
@temcguir temcguir force-pushed the temcguir/update_fake_camera_system branch from 6b93f07 to 8a84ff7 Compare May 29, 2026 07:29
@temcguir temcguir merged commit f63b6e6 into main May 29, 2026
8 of 13 checks passed
@temcguir temcguir deleted the temcguir/update_fake_camera_system branch May 29, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants