use of javax.slee.EventContext in project smscgateway by RestComm.
the class RxSmppServerSbbTest method testSubmitSm_test3_3.
@Test(groups = { "RxSmppServer" })
public void testSubmitSm_test3_3() throws Exception {
if (!this.cassandraDbInited)
return;
ArrayList<SmsDef> lst = new ArrayList<SmsDef>();
SmsDef sd1 = new SmsDef();
String s01 = "1234567890";
StringBuilder sb = new StringBuilder();
for (int i1 = 0; i1 < 20; i1++) {
sb.append(s01);
}
sd1.msg = sb.toString();
sd1.stored = true;
lst.add(sd1);
SmsDef sd2 = new SmsDef();
sd2.msg = "Msg 2";
sd2.stored = true;
lst.add(sd2);
SmsSet smsSet = prepareDatabase(lst);
SmsSetEvent event = new SmsSetEvent();
event.setSmsSet(smsSet);
EventContext eventContext = null;
ActivityContextInterface aci = new SmppTransactionProxy(esme);
this.sbb.onDeliverSm(event, aci, eventContext);
DeliverSmResp eventResp = new DeliverSmResp();
eventResp.setSequenceNumber(sbb.getNextSentSequenseId());
this.sbb.onDeliverSmRespParent(eventResp, aci, eventContext);
eventResp = new DeliverSmResp();
eventResp.setSequenceNumber(sbb.getNextSentSequenseId());
this.sbb.onDeliverSmRespParent(eventResp, aci, eventContext);
eventResp = new DeliverSmResp();
eventResp.setSequenceNumber(sbb.getNextSentSequenseId());
this.sbb.onDeliverSmRespParent(eventResp, aci, eventContext);
}
use of javax.slee.EventContext in project smscgateway by RestComm.
the class RxSmppServerSbbTest method testSubmitSm_test3_2.
@Test(groups = { "RxSmppServer" })
public void testSubmitSm_test3_2() throws Exception {
if (!this.cassandraDbInited)
return;
ArrayList<SmsDef> lst = new ArrayList<SmsDef>();
SmsDef sd1 = new SmsDef();
sd1.msg = "Msg 1";
sd1.stored = true;
lst.add(sd1);
SmsDef sd2 = new SmsDef();
sd2.msg = "Msg 2";
sd2.stored = true;
lst.add(sd2);
SmsDef sd3 = new SmsDef();
sd3.msg = "Msg 3";
sd3.stored = true;
lst.add(sd3);
SmsSet smsSet = prepareDatabase(lst);
SmsSetEvent event = new SmsSetEvent();
event.setSmsSet(smsSet);
EventContext eventContext = null;
ActivityContextInterface aci = new SmppTransactionProxy(esme);
this.sbb.onDeliverSm(event, aci, eventContext);
DeliverSmResp eventResp = new DeliverSmResp();
eventResp.setSequenceNumber(sbb.getNextSentSequenseId());
this.sbb.onDeliverSmRespParent(eventResp, aci, eventContext);
eventResp = new DeliverSmResp();
// eventResp.setCommandStatus(2);
eventResp.setSequenceNumber(sbb.getNextSentSequenseId());
// eventResp.setSequenceNumber(10001);
this.sbb.onDeliverSmRespParent(eventResp, aci, eventContext);
eventResp = new DeliverSmResp();
eventResp.setSequenceNumber(sbb.getNextSentSequenseId());
this.sbb.onPduRequestTimeoutParent(null, aci, eventContext);
// this.sbb.onDeliverSmResp(eventResp, aci, eventContext);
}
use of javax.slee.EventContext in project smscgateway by RestComm.
the class RxSmppServerSbbTest method testSubmitSm_test1_2.
@Test(groups = { "RxSmppServer" })
public void testSubmitSm_test1_2() throws Exception {
if (!this.cassandraDbInited)
return;
ArrayList<SmsDef> lst = new ArrayList<SmsDef>();
SmsDef sd1 = new SmsDef();
sd1.stored = true;
lst.add(sd1);
SmsSet smsSet = prepareDatabase(lst);
SmsSetEvent event = new SmsSetEvent();
event.setSmsSet(smsSet);
EventContext eventContext = null;
ActivityContextInterface aci = new SmppTransactionProxy(esme);
this.sbb.onDeliverSm(event, aci, eventContext);
DeliverSmResp eventResp = new DeliverSmResp();
eventResp.setSequenceNumber(sbb.getNextSentSequenseId());
this.sbb.onDeliverSmRespParent(eventResp, aci, eventContext);
}
use of javax.slee.EventContext in project smscgateway by RestComm.
the class RxSmppServerSbbTest method testSubmitSm_test1.
@Test(groups = { "RxSmppServer" })
public void testSubmitSm_test1() throws Exception {
if (!this.cassandraDbInited)
return;
ArrayList<SmsDef> lst = new ArrayList<SmsDef>();
SmsDef sd1 = new SmsDef();
lst.add(sd1);
SmsSet smsSet = prepareDatabase(lst);
SmsSetEvent event = new SmsSetEvent();
event.setSmsSet(smsSet);
EventContext eventContext = null;
ActivityContextInterface aci = new SmppTransactionProxy(esme);
this.sbb.onDeliverSm(event, aci, eventContext);
DeliverSmResp eventResp = new DeliverSmResp();
eventResp.setSequenceNumber(sbb.getNextSentSequenseId());
this.sbb.onDeliverSmRespParent(eventResp, aci, eventContext);
}
Aggregations