Search in sources :

Example 6 with BatteryInfo

use of com.att.aro.core.peripheral.pojo.BatteryInfo in project VideoOptimzer by attdevsupport.

the class BatteryInfoReaderImplTest method readAllLineException.

@Test
public void readAllLineException() throws IOException {
    Mockito.when(filereader.fileExist(Mockito.anyString())).thenReturn(true);
    Mockito.when(filereader.readAllLine(Mockito.anyString())).thenThrow(new IOException("failed on purpose"));
    List<BatteryInfo> batteryInfos = batteryreader.readData("/", 0);
    assertTrue(batteryInfos.size() == 0);
}
Also used : BatteryInfo(com.att.aro.core.peripheral.pojo.BatteryInfo) IOException(java.io.IOException) Test(org.junit.Test) BaseTest(com.att.aro.core.BaseTest)

Aggregations

BatteryInfo (com.att.aro.core.peripheral.pojo.BatteryInfo)6 ArrayList (java.util.ArrayList)3 BaseTest (com.att.aro.core.BaseTest)2 TraceDirectoryResult (com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult)2 BluetoothInfo (com.att.aro.core.peripheral.pojo.BluetoothInfo)2 CameraInfo (com.att.aro.core.peripheral.pojo.CameraInfo)2 GpsInfo (com.att.aro.core.peripheral.pojo.GpsInfo)2 RadioInfo (com.att.aro.core.peripheral.pojo.RadioInfo)2 ScreenStateInfo (com.att.aro.core.peripheral.pojo.ScreenStateInfo)2 UserEvent (com.att.aro.core.peripheral.pojo.UserEvent)2 WifiInfo (com.att.aro.core.peripheral.pojo.WifiInfo)2 IOException (java.io.IOException)2 Test (org.junit.Test)2 AnalysisFilter (com.att.aro.core.packetanalysis.pojo.AnalysisFilter)1 NetworkBearerTypeInfo (com.att.aro.core.packetanalysis.pojo.NetworkBearerTypeInfo)1 TimeRange (com.att.aro.core.packetanalysis.pojo.TimeRange)1 TraceResultType (com.att.aro.core.packetanalysis.pojo.TraceResultType)1 ThermalStatusReaderImpl (com.att.aro.core.peripheral.impl.ThermalStatusReaderImpl)1 AlarmInfo (com.att.aro.core.peripheral.pojo.AlarmInfo)1 CollectOptions (com.att.aro.core.peripheral.pojo.CollectOptions)1