added test for preview size on change

pull/386/head
Mevin Dhunnooa 7 years ago
parent a86ad5d45b
commit d057690d43
  1. 10
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/IntegrationTest.java

@ -157,6 +157,16 @@ public class IntegrationTest extends BaseTest {
//region test open/close
@Test
public void testPreviewSizeOnOrientationChange() {
waitForOpen(true);
controller.setDeviceOrientation(90);
assertTrue(controller.mPreviewSize.getWidth() > controller.mPreviewSize.getHeight());
controller.setDeviceOrientation(0);
assertTrue(controller.mPreviewSize.getWidth() < controller.mPreviewSize.getHeight());
}
@Test
public void testOpenClose() throws Exception {
// Starting and stopping are hard to get since they happen on another thread.

Loading…
Cancel
Save