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());
}
Aggregations