Skip to content
Merged
Prev Previous commit
Next Next commit
++
  • Loading branch information
jonahwilliams committed May 24, 2024
commit 14833b18ca5baee93376fae98ecebcea75da33af
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,15 @@ public void createSurfaceProvider_createsExpectedPreviewSurfaceProvider() {
mock(SystemServicesFlutterApiImpl.class);
final int resolutionWidth = 200;
final int resolutionHeight = 500;
final Long surfaceProducerEntryId = 120L;

previewHostApi.cameraXProxy = mockCameraXProxy;
when(mockSurfaceRequest.getResolution())
.thenReturn(new Size(resolutionWidth, resolutionHeight));
when(mockCameraXProxy.createSystemServicesFlutterApiImpl(mockBinaryMessenger))
.thenReturn(mockSystemServicesFlutterApi);
when(mockTextureRegistry.createSurfaceProducer()).thenReturn(mockSurfaceProducer);
when(mockSurfaceProducer.id()).thenReturn(1);
when(mockSurfaceProducer.id()).thenReturn(surfaceProducerEntryId);
when(mockSurfaceProducer.getSurface()).thenReturn(mockSurface);

final ArgumentCaptor<Surface> surfaceCaptor = ArgumentCaptor.forClass(Surface.class);
Expand Down