use of org.marre.sms.SmsPort in project SMSGate by Lihuanghe.
the class TestCmppSubmitRequestMessageCodec method testPortTextSMSH.
@Test
public void testPortTextSMSH() {
Random rnd_ = new Random();
CmppSubmitRequestMessage msg = createTestReq("");
SmsPortAddressedTextMessage textMsg = new SmsPortAddressedTextMessage(new SmsPort(rnd_.nextInt() & 0xffff, ""), new SmsPort(rnd_.nextInt() & 0xffff, ""), "这是一条端口文本短信");
msg.setMsgContent(textMsg);
CmppSubmitRequestMessage result = testWapCodec(msg);
SmsPortAddressedTextMessage smsmsg = (SmsPortAddressedTextMessage) result.getSmsMessage();
Assert.assertEquals(textMsg.getDestPort_(), smsmsg.getDestPort_());
Assert.assertEquals(textMsg.getOrigPort_(), smsmsg.getOrigPort_());
Assert.assertEquals(textMsg.getText(), smsmsg.getText());
}
use of org.marre.sms.SmsPort in project SMSGate by Lihuanghe.
the class TestSMPP2CMPPSubmitCodec method testPortTextSMSH.
@Test
public void testPortTextSMSH() {
Random rnd_ = new Random();
CmppSubmitRequestMessage msg = createTestReq("");
SmsPortAddressedTextMessage textMsg = new SmsPortAddressedTextMessage(new SmsPort(rnd_.nextInt() & 0xffff, ""), new SmsPort(rnd_.nextInt() & 0xffff, ""), "这是一条端口文本短信");
msg.setMsgContent(textMsg);
CmppSubmitRequestMessage result = testWapCodec(msg);
SmsPortAddressedTextMessage smsmsg = (SmsPortAddressedTextMessage) result.getSmsMessage();
Assert.assertEquals(textMsg.getDestPort_(), smsmsg.getDestPort_());
Assert.assertEquals(textMsg.getOrigPort_(), smsmsg.getOrigPort_());
Assert.assertEquals(textMsg.getText(), smsmsg.getText());
}
Aggregations