Search in sources :

Example 1 with MetaDataHelper

use of com.att.aro.core.tracemetadata.impl.MetaDataHelper in project VideoOptimzer by attdevsupport.

the class PacketAnalyzerImplTest method Test_analyzeTraceDirectory_returnIsPacketAnalyzerResult.

@Test
public void Test_analyzeTraceDirectory_returnIsPacketAnalyzerResult() throws Exception {
    iPacketAnalyzer.setEnergyModelFactory(energymodelfactory);
    iPacketAnalyzer.setBurstCollectionAnalayzer(burstcollectionanalyzer);
    iPacketAnalyzer.setRrcStateMachineFactory(statemachinefactory);
    iPacketAnalyzer.setProfileFactory(profilefactory);
    TraceDirectoryResult mockTraceDirResult = mock(TraceDirectoryResult.class);
    MetaDataHelper metaDataHelper = mock(MetaDataHelper.class);
    MetaDataModel metaDataModel = new MetaDataModel();
    AnalysisFilter filter = mock(AnalysisFilter.class);
    filter.setIpv4Sel(true);
    filter.setIpv6Sel(true);
    filter.setUdpSel(true);
    CpuActivityList cpuList = new CpuActivityList();
    cpuList.add(new CpuActivity());
    when(mockTraceDirResult.getCpuActivityList()).thenReturn(cpuList);
    when(tracereader.readTraceDirectory(any(String.class))).thenReturn(mockTraceDirResult);
    when(metaDataHelper.initMetaData(any(PacketAnalyzerResult.class))).thenReturn(metaDataModel);
    ProfileLTE profileLTE = new ProfileLTE();
    when(profilefactory.createLTEdefault()).thenReturn(profileLTE);
    PacketAnalyzerResult testResult = iPacketAnalyzer.analyzeTraceDirectory("", profileLTE, filter);
    assertEquals(null, testResult.getSessionlist());
}
Also used : CpuActivityList(com.att.aro.core.peripheral.pojo.CpuActivityList) AnalysisFilter(com.att.aro.core.packetanalysis.pojo.AnalysisFilter) MetaDataModel(com.att.aro.core.tracemetadata.pojo.MetaDataModel) TraceDirectoryResult(com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult) PacketAnalyzerResult(com.att.aro.core.packetanalysis.pojo.PacketAnalyzerResult) MetaDataHelper(com.att.aro.core.tracemetadata.impl.MetaDataHelper) ProfileLTE(com.att.aro.core.configuration.pojo.ProfileLTE) CpuActivity(com.att.aro.core.peripheral.pojo.CpuActivity) BaseTest(com.att.aro.core.BaseTest) Test(org.junit.Test)

Aggregations

BaseTest (com.att.aro.core.BaseTest)1 ProfileLTE (com.att.aro.core.configuration.pojo.ProfileLTE)1 AnalysisFilter (com.att.aro.core.packetanalysis.pojo.AnalysisFilter)1 PacketAnalyzerResult (com.att.aro.core.packetanalysis.pojo.PacketAnalyzerResult)1 TraceDirectoryResult (com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult)1 CpuActivity (com.att.aro.core.peripheral.pojo.CpuActivity)1 CpuActivityList (com.att.aro.core.peripheral.pojo.CpuActivityList)1 MetaDataHelper (com.att.aro.core.tracemetadata.impl.MetaDataHelper)1 MetaDataModel (com.att.aro.core.tracemetadata.pojo.MetaDataModel)1 Test (org.junit.Test)1