Add setSystemConstraints and setCurrentCameraState to FakeCameraSystem#524
Conversation
There was a problem hiding this comment.
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.
f321bf4 to
6b93f07
Compare
|
/gemini review |
There was a problem hiding this comment.
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.
6b93f07 to
8a84ff7
Compare
Added
setCurrentCameraStateandsetSystemConstraintstest-only methods toFakeCameraSystemto allow for manipulating state flow easily. UpdatedFakeCameraSystemTestto cover these two new methods, and included KDocs as per the style guide.