@Ignore @Test public void teststartCollector_resultIsErrorCode205() { when(filemanager.directoryExist(any(String.class))).thenReturn(true); IDevice mockDevice = mock(IDevice.class); when(mockDevice.isEmulator()).thenReturn(true); IDevice[] devlist = { mockDevice }; when(mockDevice.getSerialNumber()).thenReturn("abc"); try { when(adbservice.getConnectedDevices()).thenReturn(devlist); } catch (Exception e) { e.printStackTrace(); } try { when(androidev.isAndroidRooted(any(IDevice.class))).thenReturn(true); } catch (Exception e) { e.printStackTrace(); } when(android.isSDCardEnoughSpace(any(IDevice.class), any(long.class))).thenReturn(false); StatusResult testResult = rootedAndroidCollectorImpl.startCollector(true, "", VideoOption.NONE, false, "abc", null, null); assertEquals(205, testResult.getError().getCode()); }
@Override public StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, String password) { return this.startCollector(isCommandLine, folderToSaveTrace, videoOption, true, null, null, password); }
RootedAndroidCollectorImpl implements IDataCollector, IVideoImageSubscriber { @Override public StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, String password) { return this.startCollector(isCommandLine, folderToSaveTrace, videoOption, true, null, null, password); } }
RootedAndroidCollectorImpl implements IDataCollector, IVideoImageSubscriber { @Override public StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, String password) { return this.startCollector(isCommandLine, folderToSaveTrace, videoOption, true, null, null, password); }  }
RootedAndroidCollectorImpl implements IDataCollector, IVideoImageSubscriber { @Override public StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, String password) { return this.startCollector(isCommandLine, folderToSaveTrace, videoOption, true, null, null, password); }  int getMilliSecondsForTimeout(); @Override String getName(); @Override void addDeviceStatusSubscriber(IDeviceStatus devicestatus); @Override void addVideoImageSubscriber(IVideoImageSubscriber subscriber); @Override int getMajorVersion(); @Override String getMinorVersion(); @Override DataCollectorType getType(); @Override boolean isRunning(); @Override String[] getLog(); @Override StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, String password); @Override StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, boolean isLiveViewVideo, String deviceId, Hashtable<String, Object> extraParams, String password); @Override void timeOutShutdown(); @Override void haltCollectorInDevice(); @Override boolean isTrafficCaptureRunning(int seconds); void startVideoCapture(); @Override StatusResult stopCollector(); @Override void receiveImage(BufferedImage videoimage); @Override String getPassword(); @Override boolean setPassword(String requestPassword); @Override String[] getDeviceSerialNumber(StatusResult status); @Override IAroDevice[] getDevices(StatusResult status); @Override boolean isDeviceDataPulled(); }
RootedAndroidCollectorImpl implements IDataCollector, IVideoImageSubscriber { @Override public StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, String password) { return this.startCollector(isCommandLine, folderToSaveTrace, videoOption, true, null, null, password); }  int getMilliSecondsForTimeout(); @Override String getName(); @Override void addDeviceStatusSubscriber(IDeviceStatus devicestatus); @Override void addVideoImageSubscriber(IVideoImageSubscriber subscriber); @Override int getMajorVersion(); @Override String getMinorVersion(); @Override DataCollectorType getType(); @Override boolean isRunning(); @Override String[] getLog(); @Override StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, String password); @Override StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, boolean isLiveViewVideo, String deviceId, Hashtable<String, Object> extraParams, String password); @Override void timeOutShutdown(); @Override void haltCollectorInDevice(); @Override boolean isTrafficCaptureRunning(int seconds); void startVideoCapture(); @Override StatusResult stopCollector(); @Override void receiveImage(BufferedImage videoimage); @Override String getPassword(); @Override boolean setPassword(String requestPassword); @Override String[] getDeviceSerialNumber(StatusResult status); @Override IAroDevice[] getDevices(StatusResult status); @Override boolean isDeviceDataPulled();  }