Search in sources :

Example 6 with TraceFileResult

use of com.att.aro.core.packetanalysis.pojo.TraceFileResult in project VideoOptimzer by attdevsupport.

the class TraceDataReaderImplTest method readTraceFile_fileIsEmpty.

@Test
public void readTraceFile_fileIsEmpty() throws IOException {
    Date date = new Date();
    traceDataReaderImpl.setFileReader(filereader);
    when(filereader.fileExist(any(String.class))).thenReturn(true);
    when(filereader.getDirectory(any(String.class))).thenReturn(Util.getCurrentRunningDir());
    when(filereader.getLastModified(any(String.class))).thenReturn(date.getTime());
    TraceFileResult result = traceDataReaderImpl.readTraceFile(Util.getCurrentRunningDir() + Util.FILE_SEPARATOR + "traffic.cap");
    assertSame(0, result.getAllpackets().size());
}
Also used : TraceFileResult(com.att.aro.core.packetanalysis.pojo.TraceFileResult) Date(java.util.Date) BaseTest(com.att.aro.core.BaseTest) Test(org.junit.Test)

Aggregations

TraceFileResult (com.att.aro.core.packetanalysis.pojo.TraceFileResult)6 BaseTest (com.att.aro.core.BaseTest)5 Test (org.junit.Test)5 PacketAnalyzerResult (com.att.aro.core.packetanalysis.pojo.PacketAnalyzerResult)3 PacketInfo (com.att.aro.core.packetanalysis.pojo.PacketInfo)3 ArrayList (java.util.ArrayList)3 BestPracticeType (com.att.aro.core.bestpractice.pojo.BestPracticeType)2 Profile (com.att.aro.core.configuration.pojo.Profile)2 AnalysisFilter (com.att.aro.core.packetanalysis.pojo.AnalysisFilter)2 Packet (com.att.aro.core.packetreader.pojo.Packet)2 AROTraceData (com.att.aro.core.pojo.AROTraceData)2 InetAddress (java.net.InetAddress)2 Date (java.util.Date)2 PeriodicTransferResult (com.att.aro.core.bestpractice.pojo.PeriodicTransferResult)1 ProfileLTE (com.att.aro.core.configuration.pojo.ProfileLTE)1 IPacketAnalyzer (com.att.aro.core.packetanalysis.IPacketAnalyzer)1 BurstCollectionAnalysisData (com.att.aro.core.packetanalysis.pojo.BurstCollectionAnalysisData)1 EnergyModel (com.att.aro.core.packetanalysis.pojo.EnergyModel)1 RrcStateMachineLTE (com.att.aro.core.packetanalysis.pojo.RrcStateMachineLTE)1 RrcStateRange (com.att.aro.core.packetanalysis.pojo.RrcStateRange)1