Search in sources :

Example 6 with AppInfo

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

the class AppInfoReaderImplTest method readData.

@Test
public void readData() throws IOException {
    Mockito.when(filereader.fileExist(Mockito.anyString())).thenReturn(true);
    String[] arr = new String[] { "\"/system/bin/rild\"1.1", "./data/data/com.att.android.arodatacollector/tcpdump 4.1" };
    Mockito.when(filereader.readAllLine(Mockito.anyString())).thenReturn(arr);
    AppInfo info = reader.readData("/");
    assertTrue(info.getAppInfos().size() == 2);
    assertTrue(info.getAppInfos().get(1).contains("tcpdump"));
}
Also used : AppInfo(com.att.aro.core.peripheral.pojo.AppInfo) Test(org.junit.Test) BaseTest(com.att.aro.core.BaseTest)

Example 7 with AppInfo

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

the class AppInfoReaderImplTest method readDataNoFile.

@Test
public void readDataNoFile() throws IOException {
    Mockito.when(filereader.fileExist(Mockito.anyString())).thenReturn(false);
    AppInfo info = null;
    info = reader.readData("/");
    assertTrue(info.getAppInfos().size() == 0);
}
Also used : AppInfo(com.att.aro.core.peripheral.pojo.AppInfo) Test(org.junit.Test) BaseTest(com.att.aro.core.BaseTest)

Aggregations

AppInfo (com.att.aro.core.peripheral.pojo.AppInfo)7 BaseTest (com.att.aro.core.BaseTest)5 Test (org.junit.Test)5 TraceDirectoryResult (com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult)3 IOException (java.io.IOException)3 ScheduledAlarmInfo (com.att.aro.core.packetanalysis.pojo.ScheduledAlarmInfo)2 IPacketListener (com.att.aro.core.packetreader.IPacketListener)2 IPPacket (com.att.aro.core.packetreader.pojo.IPPacket)2 AlarmAnalysisInfo (com.att.aro.core.peripheral.pojo.AlarmAnalysisInfo)2 AlarmAnalysisResult (com.att.aro.core.peripheral.pojo.AlarmAnalysisResult)2 DeviceDetail (com.att.aro.core.peripheral.pojo.DeviceDetail)2 NetworkTypeObject (com.att.aro.core.peripheral.pojo.NetworkTypeObject)2 InetAddress (java.net.InetAddress)2 UnknownHostException (java.net.UnknownHostException)2 ArrayList (java.util.ArrayList)2 Date (java.util.Date)2 HashMap (java.util.HashMap)2 List (java.util.List)2 InvocationOnMock (org.mockito.invocation.InvocationOnMock)2 CollectOptions (com.att.aro.core.peripheral.pojo.CollectOptions)1