Package org.mokai.connector.smpp

Examples of org.mokai.connector.smpp.SmppConfiguration


  @Test
  public void testStatus() throws Exception {
    log.info("starting testStatus ... ");

    SmppConfiguration configuration = new SmppConfiguration();
    configuration.setHost("localhost");
    configuration.setPort(SERVER_PORT);
    configuration.setSystemId("test");
    configuration.setPassword("test");

    SmppConnector connector = new SmppConnector(configuration);
    injectResource(new MockProcessorContext(), connector);
    Assert.assertEquals(connector.getStatus(), Status.UNKNOWN);
View Full Code Here


    // set the mock packet processor
    MockPacketProcessor pp = new MockPacketProcessor();
    server.setPacketProcessor(pp);

    SmppConfiguration configuration = new SmppConfiguration();
    configuration.setHost("localhost");
    configuration.setPort(SERVER_PORT);
    configuration.setSystemId("test");
    configuration.setPassword("test");
    configuration.setSystemType("test");
    configuration.setBindNPI("1");
    configuration.setBindTON("2");

    SmppConnector connector = new SmppConnector(configuration);
    injectResource(new MockProcessorContext(), connector);
    connector.doStart();
    waitUntilStatus(connector, DEFAULT_TIMEOUT, Status.OK);
View Full Code Here

    m.setProperty("from", "3542");

    Mockito.when(messageStore.list(Mockito.any(MessageCriteria.class)))
        .thenReturn(Collections.singletonList(m));

    SmppConfiguration configuration = new SmppConfiguration();
    configuration.setHost("localhost");
    configuration.setPort(SERVER_PORT);
    configuration.setSystemId("test");
    configuration.setPassword("test");
    configuration.setDataCoding(3);

    SmppConnector connector = new SmppConnector(configuration);
    injectResource(new MockProcessorContext(), connector);
    injectResource(messageStore, connector);
    connector.doStart();
View Full Code Here

    });
    server.setPacketProcessor(pp);

    MessageStore messageStore = Mockito.mock(MessageStore.class);

    SmppConfiguration configuration = new SmppConfiguration();
    configuration.setHost("localhost");
    configuration.setPort(SERVER_PORT);
    configuration.setSystemId("test");
    configuration.setPassword("test");
    configuration.setDataCoding(3);

    SmppConnector connector = new SmppConnector(configuration);
    injectResource(new MockProcessorContext(), connector);
    injectResource(messageStore, connector);
    connector.doStart();
View Full Code Here

  public void testReceiveMessage() throws Exception {
    log.info("starting testReceiveMessage ... ");

    MockMessageProducer messageProducer = new MockMessageProducer();

    SmppConfiguration configuration = new SmppConfiguration();
    configuration.setHost("localhost");
    configuration.setPort(SERVER_PORT);
    configuration.setSystemId("test");
    configuration.setPassword("test");

    SmppConnector connector = new SmppConnector(configuration);
    injectResource(new MockProcessorContext(), connector);
    injectResource(messageProducer, connector);
    connector.doStart();
View Full Code Here

  public void testReceiveDeliveryReceipt() throws Exception {
    log.info("starting testReceiveDeliveryReceipt ... ");

    server.setPacketProcessor(new CustomPacketProcessor("12000"));

    SmppConfiguration configuration = new SmppConfiguration();
    configuration.setHost("localhost");
    configuration.setPort(SERVER_PORT);
    configuration.setSystemId("test");
    configuration.setPassword("test");

    MockMessageStore messageStore = new MockMessageStore();
    MockMessageProducer messageProducer = new MockMessageProducer();
    SmppConnector connector = createAndStartSmppConnector(configuration, messageStore, messageProducer);
View Full Code Here

  public void testReceiveDeliveryReceiptWithHexaId() throws Exception {
    log.info("starting testReceiveDeliveryReceiptWithHexaId ... ");

    server.setPacketProcessor(new CustomPacketProcessor("98765432101"));

    SmppConfiguration configuration = new SmppConfiguration();
    configuration.setHost("localhost");
    configuration.setPort(SERVER_PORT);
    configuration.setSystemId("test");
    configuration.setPassword("test");
    configuration.setDlrIdConversion(DlrIdConversion.HEXA_TO_DEC);

    MockMessageStore messageStore = new MockMessageStore();
    MockMessageProducer messageProducer = new MockMessageProducer();
    SmppConnector connector = createAndStartSmppConnector(configuration, messageStore, messageProducer);
View Full Code Here

  public void testReceiveDeliveryReceiptWithDecId() throws Exception {
    log.info("starting testReceiveDeliveryReceiptWithDecId ... ");

    server.setPacketProcessor(new CustomPacketProcessor("16fee0e525"));

    SmppConfiguration configuration = new SmppConfiguration();
    configuration.setHost("localhost");
    configuration.setPort(SERVER_PORT);
    configuration.setSystemId("test");
    configuration.setPassword("test");
    configuration.setDlrIdConversion(DlrIdConversion.DEC_TO_HEXA);

    MockMessageStore messageStore = new MockMessageStore();
    MockMessageProducer messageProducer = new MockMessageProducer();
    SmppConnector connector = createAndStartSmppConnector(configuration, messageStore, messageProducer);
View Full Code Here

        responseSender.send( Response.OK );
      }

    });

    SmppConfiguration configuration = new SmppConfiguration();
    configuration.setHost("localhost");
    configuration.setPort(SERVER_PORT);
    configuration.setSystemId("test");
    configuration.setPassword("test");
    configuration.addFailedCommandStatus(Response.MESSAGE_QUEUE_FULL.getCommandStatus());

    MockMessageStore messageStore = new MockMessageStore();
    MockMessageProducer messageProducer = new MockMessageProducer();
    SmppConnector connector = createAndStartSmppConnector(configuration, messageStore, messageProducer);
View Full Code Here

  @Test
  public void shouldNotRouteDeliveryReceipt() throws Exception {
    MockMessageProducer messageProducer = new MockMessageProducer();

    SmppConfiguration configuration = new SmppConfiguration();
    configuration.setHost("localhost");
    configuration.setPort(SERVER_PORT);
    configuration.setSystemId("test");
    configuration.setPassword("test");

    MessageStore messageStore = new MockMessageStore();

    SmppConnector connector = new SmppConnector(configuration);
    injectResource(new MockProcessorContext(), connector);
View Full Code Here

TOP

Related Classes of org.mokai.connector.smpp.SmppConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.