Search in sources :

Example 6 with SubmitSm

use of com.zx.sms.codec.smpp.msg.SubmitSm in project SMSGate by Lihuanghe.

the class TestBaseSmCodec method testsmpp.

@Test
public /**
 * https://smpp.org/
 */
void testsmpp() {
    SubmitSm pdu = new SubmitSm();
    pdu.setDestAddress(new Address((byte) 1, (byte) 1, "447712345678"));
    pdu.setSourceAddress(new Address((byte) 5, (byte) 0, "MelroseLabs"));
    pdu.setSmsMsg(new SmsTextMessage("Hello World €$£", SmppSmsDcs.getGeneralDataCodingDcs(SmsAlphabet.GSM, SmsMsgClass.CLASS_UNKNOWN)));
    pdu.setRegisteredDelivery((byte) 1);
    testlongCodec(pdu);
}
Also used : SmsTextMessage(org.marre.sms.SmsTextMessage) SubmitSm(com.zx.sms.codec.smpp.msg.SubmitSm) Test(org.junit.Test)

Example 7 with SubmitSm

use of com.zx.sms.codec.smpp.msg.SubmitSm in project SMSGate by Lihuanghe.

the class TestBaseSmCodec method testdefaultcode.

@Test
public void testdefaultcode() {
    SubmitSm pdu = new SubmitSm();
    pdu.setDestAddress(new Address((byte) 0, (byte) 0, "1111"));
    pdu.setSourceAddress(new Address((byte) 0, (byte) 0, "2222"));
    pdu.setSmsMsg(gsmstr);
    testlongCodec(pdu);
}
Also used : SubmitSm(com.zx.sms.codec.smpp.msg.SubmitSm) Test(org.junit.Test)

Example 8 with SubmitSm

use of com.zx.sms.codec.smpp.msg.SubmitSm in project SMSGate by Lihuanghe.

the class TestBaseSmCodec method testGSMcode.

@Test
public void testGSMcode() {
    SubmitSm pdu = new SubmitSm();
    pdu.setDestAddress(new Address((byte) 0, (byte) 0, "1111"));
    pdu.setSourceAddress(new Address((byte) 0, (byte) 0, "2222"));
    pdu.setSmsMsg(new SmsTextMessage("[@[@[@[@", SmppSmsDcs.getGeneralDataCodingDcs(SmsAlphabet.GSM, SmsMsgClass.CLASS_UNKNOWN)));
    testlongCodec(pdu);
}
Also used : SmsTextMessage(org.marre.sms.SmsTextMessage) SubmitSm(com.zx.sms.codec.smpp.msg.SubmitSm) Test(org.junit.Test)

Aggregations

SubmitSm (com.zx.sms.codec.smpp.msg.SubmitSm)8 Test (org.junit.Test)5 DeliverSm (com.zx.sms.codec.smpp.msg.DeliverSm)3 SmsTextMessage (org.marre.sms.SmsTextMessage)3 DeliverSmResp (com.zx.sms.codec.smpp.msg.DeliverSmResp)2 SubmitSmResp (com.zx.sms.codec.smpp.msg.SubmitSmResp)2 Address (com.zx.sms.codec.smpp.Address)1 AlertNotification (com.zx.sms.codec.smpp.msg.AlertNotification)1 BindReceiver (com.zx.sms.codec.smpp.msg.BindReceiver)1 BindReceiverResp (com.zx.sms.codec.smpp.msg.BindReceiverResp)1 BindTransceiver (com.zx.sms.codec.smpp.msg.BindTransceiver)1 BindTransceiverResp (com.zx.sms.codec.smpp.msg.BindTransceiverResp)1 BindTransmitter (com.zx.sms.codec.smpp.msg.BindTransmitter)1 BindTransmitterResp (com.zx.sms.codec.smpp.msg.BindTransmitterResp)1 CancelSm (com.zx.sms.codec.smpp.msg.CancelSm)1 CancelSmResp (com.zx.sms.codec.smpp.msg.CancelSmResp)1 DataSm (com.zx.sms.codec.smpp.msg.DataSm)1 DataSmResp (com.zx.sms.codec.smpp.msg.DataSmResp)1 DeliverSmReceipt (com.zx.sms.codec.smpp.msg.DeliverSmReceipt)1 EnquireLink (com.zx.sms.codec.smpp.msg.EnquireLink)1