@Test public void getWifiActiveDuration() throws IOException { Mockito.when(filereader.fileExist(wifi_events)).thenReturn(true); Mockito.when(filereader.readAllLine(Mockito.anyString())).thenReturn( new String[] { "1.41142116305E9 CONNECTED 84:db:2f:0b:fe:f0 -74 Elevate-FEF0" ,"1.412421163196E9 CONNECTED 00:24:36:a7:08:5a -47 The Rabbit Hole 5GHz"}); traceDataReader.setFileReader(filereader); traceDataReader.readData("", 1.412361724E12, 1412361675045.0); double activeDuration = traceDataReader.getWifiActiveDuration(); assertEquals(1.412361675045E12, activeDuration, 0); }
@Override public double getWifiActiveDuration() { return this.wifiActiveDuration; }
WifiInfoReaderImpl extends PeripheralBase implements IWifiInfoReader { @Override public double getWifiActiveDuration() { return this.wifiActiveDuration; } }
WifiInfoReaderImpl extends PeripheralBase implements IWifiInfoReader { @Override public double getWifiActiveDuration() { return this.wifiActiveDuration; }  }
WifiInfoReaderImpl extends PeripheralBase implements IWifiInfoReader { @Override public double getWifiActiveDuration() { return this.wifiActiveDuration; }  @Override List<WifiInfo> readData(String directory, double startTime, double traceDuration); @Override double getWifiActiveDuration(); }
WifiInfoReaderImpl extends PeripheralBase implements IWifiInfoReader { @Override public double getWifiActiveDuration() { return this.wifiActiveDuration; }  @Override List<WifiInfo> readData(String directory, double startTime, double traceDuration); @Override double getWifiActiveDuration();  }