use of com.att.aro.core.peripheral.pojo.AlarmInfo in project VideoOptimzer by attdevsupport.
the class AlarmInfoReaderImplTest method readData_BadData.
@Test
public void readData_BadData() throws IOException {
Mockito.when(filereader.readAllLine(Mockito.anyString())).thenReturn(new String[] { "<6>[ 0.000z00] Initializing cgroup subsys cpu", "<6>[ 1770.877611] alarm_timer_triggered type 0 at 302m2491z4374", "<MCLL>[ 0.000000] CPU: ARMv7 Processor [412fc082] revision 2 (ARMv7), cr=10c53c7d" });
Date traceDateTime = new Date();
Mockito.when(filereader.fileExist(traceFolder + Util.FILE_SEPARATOR + TraceDataConst.FileName.KERNEL_LOG_FILE)).thenReturn(true);
List<AlarmInfo> list = reader.readData(traceFolder, 123, 124, traceDateTime);
assertTrue(list.size() == 0);
}
use of com.att.aro.core.peripheral.pojo.AlarmInfo in project VideoOptimzer by attdevsupport.
the class AlarmInfoReaderImplTest method readData.
@Test
public void readData() throws IOException {
// reader = context.getBean(AlarmInfoReaderImpl.class);
// IFileManager filereader = Mockito.mock(IFileManager.class);
String[] arr = getAlarmData();
Mockito.when(filereader.readAllLine(Mockito.anyString())).thenReturn(arr);
Date traceDateTime = new Date();
Mockito.when(filereader.fileExist(traceFolder + Util.FILE_SEPARATOR + TraceDataConst.FileName.KERNEL_LOG_FILE)).thenReturn(true);
List<AlarmInfo> list = reader.readData(traceFolder, 123, 124, traceDateTime);
assertTrue(list.size() > 0);
}
Aggregations