use of com.att.aro.core.configuration.pojo.Profile3G 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.configuration.pojo.Profile3G 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.configuration.pojo.Profile3G 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