use of com.att.aro.core.packetanalysis.pojo.RrcStateRange in project VideoOptimzer by attdevsupport.
the class RrcStateRangeFactoryImplTest method Create3G_test13.
@Test
public void Create3G_test13() {
// RRCState.STATE_FACH
Profile3G profile3g = mock(Profile3G.class);
when(profile3g.getProfileType()).thenReturn(ProfileType.T3G);
when(profile3g.getIdleDchPromoAvg()).thenReturn(12000.0);
when(profile3g.getIdleDchPromoMin()).thenReturn(1000.0);
when(profile3g.getIdleDchPromoMax()).thenReturn(20000.0);
when(profile3g.getFachDchPromoAvg()).thenReturn(1000.0);
when(profile3g.getFachDchPromoMin()).thenReturn(2500.0);
when(profile3g.getFachDchPromoMax()).thenReturn(6000.0);
when(profile3g.getDchFachTimer()).thenReturn(1000.0);
when(profile3g.getFachIdleTimer()).thenReturn(2000.0);
double traceDuration = 2000.0;
List<PacketInfo> packetlist = new ArrayList<PacketInfo>();
when(pktInfoArray[0].getTimeStamp()).thenReturn(date.getTime() - 1500.0);
when(pktInfoArray[0].getDir()).thenReturn(PacketDirection.UPLINK);
when(pktInfoArray[0].getLen()).thenReturn(1000);
when(pktInfoArray[0].getStateMachine()).thenReturn(RRCState.STATE_FACH);
packetlist.add(pktInfoArray[0]);
when(pktInfoArray[1].getTimeStamp()).thenReturn(date.getTime() + 1000.0);
when(pktInfoArray[1].getDir()).thenReturn(PacketDirection.UPLINK);
when(pktInfoArray[1].getLen()).thenReturn(1000);
when(pktInfoArray[1].getStateMachine()).thenReturn(RRCState.STATE_FACH);
packetlist.add(pktInfoArray[1]);
when(pktInfoArray[2].getTimeStamp()).thenReturn(date.getTime() + 1500.0);
when(pktInfoArray[2].getDir()).thenReturn(PacketDirection.UPLINK);
when(pktInfoArray[2].getLen()).thenReturn(1000);
when(pktInfoArray[2].getStateMachine()).thenReturn(RRCState.STATE_FACH);
packetlist.add(pktInfoArray[2]);
List<RrcStateRange> testList = rrcStateRangeFactory.create(packetlist, profile3g, traceDuration);
assertEquals(1, testList.size());
}
use of com.att.aro.core.packetanalysis.pojo.RrcStateRange in project VideoOptimzer by attdevsupport.
the class RrcStateRangeFactoryImplTest method Create3G_test6.
@Test
public void Create3G_test6() {
Profile3G profile3g = mock(Profile3G.class);
when(profile3g.getProfileType()).thenReturn(ProfileType.T3G);
when(profile3g.getIdleDchPromoAvg()).thenReturn(12000.0);
when(profile3g.getIdleDchPromoMin()).thenReturn(1000.0);
when(profile3g.getIdleDchPromoMax()).thenReturn(20000.0);
when(profile3g.getFachDchPromoAvg()).thenReturn(1000.0);
when(profile3g.getFachDchPromoMin()).thenReturn(2500.0);
when(profile3g.getFachDchPromoMax()).thenReturn(6000.0);
when(profile3g.getDchFachTimer()).thenReturn(5000.0);
when(profile3g.getFachIdleTimer()).thenReturn(10000.0);
double traceDuration = 2000.0;
List<PacketInfo> packetlist = new ArrayList<PacketInfo>();
when(pktInfoArray[0].getTimeStamp()).thenReturn(date.getTime() - 5500.0);
when(pktInfoArray[0].getDir()).thenReturn(PacketDirection.UPLINK);
when(pktInfoArray[0].getLen()).thenReturn(1000);
when(pktInfoArray[0].getStateMachine()).thenReturn(RRCState.PROMO_FACH_DCH);
packetlist.add(pktInfoArray[0]);
when(pktInfoArray[1].getTimeStamp()).thenReturn(date.getTime() + 1000.0);
when(pktInfoArray[1].getDir()).thenReturn(PacketDirection.UPLINK);
when(pktInfoArray[1].getLen()).thenReturn(1000);
when(pktInfoArray[1].getStateMachine()).thenReturn(RRCState.PROMO_IDLE_DCH);
packetlist.add(pktInfoArray[1]);
when(pktInfoArray[2].getTimeStamp()).thenReturn(date.getTime() + 5000.0);
when(pktInfoArray[2].getDir()).thenReturn(PacketDirection.UPLINK);
when(pktInfoArray[2].getLen()).thenReturn(1000);
when(pktInfoArray[2].getStateMachine()).thenReturn(RRCState.PROMO_IDLE_DCH);
packetlist.add(pktInfoArray[2]);
List<RrcStateRange> testList = rrcStateRangeFactory.create(packetlist, profile3g, traceDuration);
assertEquals(1, testList.size());
}
use of com.att.aro.core.packetanalysis.pojo.RrcStateRange in project VideoOptimzer by attdevsupport.
the class RrcStateRangeFactoryImplTest method create_ProfileIsLTE.
@Test
public void create_ProfileIsLTE() {
// not sure
ProfileLTE profile01 = mock(ProfileLTE.class);
List<PacketInfo> packetlist = new ArrayList<PacketInfo>();
double traceDuration = 2000.0;
when(profile01.getProfileType()).thenReturn(ProfileType.LTE);
when(profile01.getPromotionTime()).thenReturn(1000.0);
when(profile01.getInactivityTimer()).thenReturn(1000.0);
when(profile01.getDrxShortTime()).thenReturn(1000.0);
when(profile01.getDrxLongTime()).thenReturn(1000.0);
when(pktInfoArray[0].getTimeStamp()).thenReturn(date.getTime() - 1500.0);
when(pktInfoArray[1].getTimeStamp()).thenReturn(date.getTime() + 100.0);
when(pktInfoArray[2].getTimeStamp()).thenReturn(date.getTime() + 500.0);
when(pktInfoArray[3].getTimeStamp()).thenReturn(date.getTime() + 2300.0);
when(pktInfoArray[4].getTimeStamp()).thenReturn(date.getTime() + 3005.0);
when(pktInfoArray[5].getTimeStamp()).thenReturn(date.getTime() + 4500.0);
when(pktInfoArray[6].getTimeStamp()).thenReturn(date.getTime() + 5501.0);
when(pktInfoArray[7].getTimeStamp()).thenReturn(date.getTime() + 6001.0);
when(pktInfoArray[8].getTimeStamp()).thenReturn(date.getTime() + 9001.0);
when(pktInfoArray[9].getTimeStamp()).thenReturn(date.getTime() + 16001.0);
when(pktInfoArray[10].getTimeStamp()).thenReturn(date.getTime() + 17001.0);
when(pktInfoArray[11].getTimeStamp()).thenReturn(date.getTime() + 19000.0);
when(pktInfoArray[12].getTimeStamp()).thenReturn(date.getTime() + 29900.0);
when(pktInfoArray[13].getTimeStamp()).thenReturn(date.getTime() + 35500.0);
when(pktInfoArray[14].getTimeStamp()).thenReturn(date.getTime() + 45005.0);
when(pktInfoArray[15].getTimeStamp()).thenReturn(date.getTime() + 46500.0);
when(pktInfoArray[16].getTimeStamp()).thenReturn(date.getTime() + 47501.0);
when(pktInfoArray[17].getTimeStamp()).thenReturn(date.getTime() + 47601.0);
when(pktInfoArray[18].getTimeStamp()).thenReturn(date.getTime() + 57001.0);
when(pktInfoArray[19].getTimeStamp()).thenReturn(date.getTime() + 66001.0);
for (int i = 0; i < 20; i++) {
packetlist.add(pktInfoArray[i]);
}
List<RrcStateRange> testList = rrcStateRangeFactory.create(packetlist, profile01, traceDuration);
assertEquals(64, testList.size());
}
use of com.att.aro.core.packetanalysis.pojo.RrcStateRange in project VideoOptimzer by attdevsupport.
the class RrcStateRangeFactoryImplTest method Create3G_test12.
@Test
public void Create3G_test12() {
Profile3G profile3g = mock(Profile3G.class);
when(profile3g.getProfileType()).thenReturn(ProfileType.T3G);
when(profile3g.getIdleDchPromoAvg()).thenReturn(12000.0);
when(profile3g.getIdleDchPromoMin()).thenReturn(1000.0);
when(profile3g.getIdleDchPromoMax()).thenReturn(20000.0);
when(profile3g.getFachDchPromoAvg()).thenReturn(1000.0);
when(profile3g.getFachDchPromoMin()).thenReturn(2500.0);
when(profile3g.getFachDchPromoMax()).thenReturn(6000.0);
when(profile3g.getDchFachTimer()).thenReturn(1000.0);
when(profile3g.getFachIdleTimer()).thenReturn(2000.0);
double traceDuration = 2000.0;
List<PacketInfo> packetlist = new ArrayList<PacketInfo>();
when(pktInfoArray[0].getTimeStamp()).thenReturn(date.getTime() - 1500.0);
when(pktInfoArray[0].getDir()).thenReturn(PacketDirection.UPLINK);
when(pktInfoArray[0].getLen()).thenReturn(1000);
when(pktInfoArray[0].getStateMachine()).thenReturn(RRCState.STATE_DCH);
packetlist.add(pktInfoArray[0]);
when(pktInfoArray[1].getTimeStamp()).thenReturn(date.getTime() + 1000.0);
when(pktInfoArray[1].getDir()).thenReturn(PacketDirection.UPLINK);
when(pktInfoArray[1].getLen()).thenReturn(1000);
when(pktInfoArray[1].getStateMachine()).thenReturn(RRCState.STATE_DCH);
packetlist.add(pktInfoArray[1]);
when(pktInfoArray[2].getTimeStamp()).thenReturn(date.getTime() + 1500.0);
when(pktInfoArray[2].getDir()).thenReturn(PacketDirection.UPLINK);
when(pktInfoArray[2].getLen()).thenReturn(1000);
when(pktInfoArray[2].getStateMachine()).thenReturn(RRCState.STATE_DCH);
packetlist.add(pktInfoArray[2]);
List<RrcStateRange> testList = rrcStateRangeFactory.create(packetlist, profile3g, traceDuration);
assertEquals(1, testList.size());
}
Aggregations