use of com.att.aro.core.datacollector.IVideoImageSubscriber in project VideoOptimzer by attdevsupport.
the class VideoCaptureImplTest method run_test2.
@SuppressWarnings("rawtypes")
@Test
public void run_test2() throws TimeoutException, AdbCommandRejectedException, IOException {
videoCapture.setDevice(device);
RawImage testRaw = new RawImage();
testRaw.data = imagedata;
testRaw.width = 10;
testRaw.height = 10;
testRaw.bpp = 16;
when(device.getScreenshot()).thenReturn(testRaw);
when(videoWriter.getTimeUnits()).thenReturn((int) 1000f);
IVideoImageSubscriber videoImageSub = mock(IVideoImageSubscriber.class);
videoCapture.addSubscriber(videoImageSub);
videoCapture.setDeviceManufacturer("somethingHTC");
doAnswer(new Answer() {
public Object answer(InvocationOnMock invocation) {
((Runnable) invocation.getArguments()[0]).run();
videoCapture.stopRecording();
return null;
}
}).when(threadPool).execute(any(Runnable.class));
videoCapture.run();
assertEquals(0, videoCapture.getiExceptionCount());
assertTrue(videoCapture.isAllDone());
}
use of com.att.aro.core.datacollector.IVideoImageSubscriber in project VideoOptimzer by attdevsupport.
the class RootedAndroidCollectorImplTest method testaddVideoImageSubscriber_returnIsTrue.
@Test
public void testaddVideoImageSubscriber_returnIsTrue() {
IVideoImageSubscriber mockSubscriber = mock(IVideoImageSubscriber.class);
rootedAndroidCollectorImpl.addVideoImageSubscriber(mockSubscriber);
}
Aggregations