Skip to content
Prev Previous commit
Next Next commit
Fix test
  • Loading branch information
camsim99 committed Feb 21, 2024
commit eaa939c444a981013fae84d0f046a11b49e53a50
Original file line number Diff line number Diff line change
Expand Up @@ -2027,6 +2027,7 @@ void main() {

// Set directly for test versus calling createCamera.
camera.camera = MockCamera();
camera.cameraControl = mockCameraControl;

// Tell plugin to create detached Camera2CameraControl and
// CaptureRequestOptions instances for testing.
Expand All @@ -2040,9 +2041,6 @@ void main() {
CaptureRequestOptions.detached(requestedOptions: options),
);

when(camera.camera!.getCameraControl())
.thenAnswer((_) async => mockCameraControl);

// Test auto mode.
await camera.setExposureMode(cameraId, ExposureMode.auto);

Expand Down