@Test public void getActiveDuration() throws IOException { Mockito.when(filereader.fileExist(Mockito.anyString())).thenReturn(true); String[] arr = new String[] { "1.414011237411E9 OFF", "1.414011282953E9 ACTIVE", "1.414011295886E9 PhonyState", "1.414011300035E9 ACTIVE", "1.414011311924E9 STANDBY" }; Mockito.when(filereader.readAllLine(Mockito.anyString())).thenReturn(arr); gpsEventReader.setFileReader(filereader); double activeDuration = gpsEventReader.getGpsActiveDuration(); assertEquals(24.822, ((double)Math.round(activeDuration*1000.0))/1000, 0); }
@Override public double getGpsActiveDuration() { return this.gpsActiveDuration; }
GpsInfoReaderImpl extends PeripheralBase implements IGpsInfoReader { @Override public double getGpsActiveDuration() { return this.gpsActiveDuration; } }
GpsInfoReaderImpl extends PeripheralBase implements IGpsInfoReader { @Override public double getGpsActiveDuration() { return this.gpsActiveDuration; }  }
GpsInfoReaderImpl extends PeripheralBase implements IGpsInfoReader { @Override public double getGpsActiveDuration() { return this.gpsActiveDuration; }  @Override double getGpsActiveDuration(); @Override List<GpsInfo> readData(String directory, double startTime, double traceDuration); }
GpsInfoReaderImpl extends PeripheralBase implements IGpsInfoReader { @Override public double getGpsActiveDuration() { return this.gpsActiveDuration; }  @Override double getGpsActiveDuration(); @Override List<GpsInfo> readData(String directory, double startTime, double traceDuration);  }