Examples of AlertNotification


Examples of org.jsmpp.bean.AlertNotification

        assertTrue(message.getHeaders().isEmpty());
    }

    @Test
    public void alertNotificationConstructorShouldReturnAnInstanceWithACommandAndHeaderAttributes() {
        AlertNotification command = new AlertNotification();
        message = new SmppMessage(command, new SmppConfiguration());
       
        assertTrue(message.getCommand() instanceof AlertNotification);
        assertTrue(message.getHeaders().isEmpty());
        assertTrue(message.isAlertNotification());
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        assertNull(message.createBody());
    }
   
    @Test
    public void createBodyShouldReturnNullIfTheCommandIsNotAMessageRequest() {
        AlertNotification command = new AlertNotification();
        message = new SmppMessage(command, new SmppConfiguration());
       
        assertNull(message.createBody());
    }
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        //assertEquals(0, submitSm.getSequenceNumber());
    }

    @Test
    public void createSmppMessageFromAlertNotificationShouldReturnASmppMessage() {
        AlertNotification alertNotification = new AlertNotification();
        alertNotification.setCommandId(1);
        alertNotification.setSequenceNumber(1);
        alertNotification.setSourceAddr("1616");
        alertNotification.setSourceAddrNpi(NumberingPlanIndicator.NATIONAL.value());
        alertNotification.setSourceAddrTon(TypeOfNumber.NATIONAL.value());
        alertNotification.setEsmeAddr("1717");
        alertNotification.setEsmeAddrNpi(NumberingPlanIndicator.NATIONAL.value());
        alertNotification.setEsmeAddrTon(TypeOfNumber.NATIONAL.value());
        SmppMessage smppMessage = binding.createSmppMessage(alertNotification);
       
        assertNull(smppMessage.getBody());
        assertEquals(10, smppMessage.getHeaders().size());
        assertEquals(1, smppMessage.getHeader(SmppBinding.SEQUENCE_NUMBER));
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        assertTrue(producer instanceof SmppProducer);
    }

    @Test
    public void createOnAcceptAlertNotificationExchangeAlertNotification() {
        AlertNotification alertNotification = createMock(AlertNotification.class);
        SmppMessage message = createMock(SmppMessage.class);
        expect(binding.createSmppMessage(alertNotification)).andReturn(message);
        message.setExchange(isA(Exchange.class));
       
        replay(alertNotification, binding, message);
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        assertSame(ExchangePattern.InOnly, exchange.getPattern());
    }

    @Test
    public void testCreateOnAcceptAlertNotificationExchangeExchangePatternAlertNotification() {
        AlertNotification alertNotification = createMock(AlertNotification.class);
        SmppMessage message = createMock(SmppMessage.class);
        expect(binding.createSmppMessage(alertNotification)).andReturn(message);
        message.setExchange(isA(Exchange.class));
       
        replay(alertNotification, binding, message);
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        assertTrue(message.getHeaders().isEmpty());
    }

    @Test
    public void alertNotificationConstructorShouldReturnAnInstanceWithACommandAndHeaderAttributes() {
        AlertNotification command = new AlertNotification();
        message = new SmppMessage(command, new SmppConfiguration());
       
        assertTrue(message.getCommand() instanceof AlertNotification);
        assertTrue(message.getHeaders().isEmpty());
    }
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        assertNull(message.createBody());
    }
   
    @Test
    public void createBodyShouldReturnNullIfTheCommandIsNotAMessageRequest() {
        AlertNotification command = new AlertNotification();
        message = new SmppMessage(command, new SmppConfiguration());
       
        assertNull(message.createBody());
    }
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        //assertEquals(0, submitSm.getSequenceNumber());
    }

    @Test
    public void createSmppMessageFromAlertNotificationShouldReturnASmppMessage() {
        AlertNotification alertNotification = new AlertNotification();
        alertNotification.setCommandId(1);
        alertNotification.setSequenceNumber(1);
        alertNotification.setSourceAddr("1616");
        alertNotification.setSourceAddrNpi(NumberingPlanIndicator.NATIONAL.value());
        alertNotification.setSourceAddrTon(TypeOfNumber.NATIONAL.value());
        alertNotification.setEsmeAddr("1717");
        alertNotification.setEsmeAddrNpi(NumberingPlanIndicator.NATIONAL.value());
        alertNotification.setEsmeAddrTon(TypeOfNumber.NATIONAL.value());
        SmppMessage smppMessage = binding.createSmppMessage(alertNotification);
       
        assertNull(smppMessage.getBody());
        assertEquals(9, smppMessage.getHeaders().size());
        assertEquals(1, smppMessage.getHeader(SmppBinding.SEQUENCE_NUMBER));
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        //assertEquals(0, submitSm.getSequenceNumber());
    }

    @Test
    public void createSmppMessageFromAlertNotificationShouldReturnASmppMessage() {
        AlertNotification alertNotification = new AlertNotification();
        alertNotification.setCommandId(1);
        alertNotification.setSequenceNumber(1);
        alertNotification.setSourceAddr("1616");
        alertNotification.setSourceAddrNpi(NumberingPlanIndicator.NATIONAL.value());
        alertNotification.setSourceAddrTon(TypeOfNumber.NATIONAL.value());
        alertNotification.setEsmeAddr("1717");
        alertNotification.setEsmeAddrNpi(NumberingPlanIndicator.NATIONAL.value());
        alertNotification.setEsmeAddrTon(TypeOfNumber.NATIONAL.value());
        SmppMessage smppMessage = binding.createSmppMessage(alertNotification);
       
        assertNull(smppMessage.getBody());
        assertEquals(9, smppMessage.getHeaders().size());
        assertEquals(1, smppMessage.getHeader(SmppBinding.SEQUENCE_NUMBER));
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        assertTrue(producer instanceof SmppProducer);
    }

    @Test
    public void createOnAcceptAlertNotificationExchange() {
        AlertNotification alertNotification = createMock(AlertNotification.class);
        SmppMessage message = createMock(SmppMessage.class);
        expect(binding.createSmppMessage(alertNotification)).andReturn(message);
        message.setExchange(isA(Exchange.class));
       
        replay(alertNotification, binding, message);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.