Package siia.booking.domain.cancellation

Examples of siia.booking.domain.cancellation.CancellationRequest$Requestor


        assertEquals("GOLD123456", confirmation.getReservationCode());
    }

    @Test
    public void testRejection() {
        CancellationRequest cancellationRequest = new CancellationRequest();
        cancellationRequest.setReservationCode("SILVER123456");
        input.send(MessageBuilder.withPayload(cancellationRequest).build());
        Message<?> confirmedMessage = confirmed.receive(0);
        assertNull(confirmedMessage);
        Message<?> rejectedMessage = rejected.receive(0);
        assertNotNull(rejectedMessage);
        assertEquals(CancellationRequest.class, rejectedMessage.getPayload().getClass());
        CancellationRequest request = (CancellationRequest) rejectedMessage.getPayload();
        assertEquals("SILVER123456", request.getReservationCode());
    }
View Full Code Here


    @Autowired @Qualifier("confirmed")
    PollableChannel confirmed;

    @Test
    public void testCancellations() {
        CancellationRequest cancellationRequest = new CancellationRequest();
        cancellationRequest.setReservationCode("GOLD123456");
        input.send(MessageBuilder.withPayload(cancellationRequest).build());
        Message<?> confirmedMessage = confirmed.receive(0);
        assertNotNull(confirmedMessage);
        assertEquals(CancellationConfirmation.class, confirmedMessage.getPayload().getClass());
        CancellationConfirmation confirmation = (CancellationConfirmation) confirmedMessage.getPayload();
View Full Code Here

        assertEquals("GOLD123456", confirmation.getReservationCode());
    }

    @Test(expected = MessageRejectedException.class)
    public void testRejection() {
        CancellationRequest cancellationRequest = new CancellationRequest();
        cancellationRequest.setReservationCode("SILVER123456");
        input.send(MessageBuilder.withPayload(cancellationRequest).build());
    }
View Full Code Here

    @Autowired
    StubMailSender mailSender;

    @Test
    public void testCancellationsSuccessful() {
        CancellationRequest cancellationRequest = new CancellationRequest();
        cancellationRequest.setReservationCode("GOLD123456");
        input.send(MessageBuilder.withPayload(cancellationRequest).build());
        Message<?> confirmedMessage = confirmed.receive(0);
        assertNotNull(confirmedMessage);
        assertEquals(CancellationConfirmation.class, confirmedMessage.getPayload().getClass());
        CancellationConfirmation confirmation = (CancellationConfirmation) confirmedMessage.getPayload();
View Full Code Here

        assertEquals("GOLD123456", confirmation.getReservationCode());
    }

    @Test
    public void testCancellationNotification() {
        CancellationRequest cancellationRequest = new CancellationRequest();
        cancellationRequest.setReservationCode("BRONZE123");
        input.send(MessageBuilder.withPayload(cancellationRequest).build());
        Message<?> confirmedMessage = confirmed.receive(0);
        assertNull(confirmedMessage);
        assertEquals(1, mailSender.getCount());
        assertEquals("BRONZE123 has been rejected", mailSender.getLastMessageText());
View Full Code Here

    @Autowired @Qualifier("rejected")
    PollableChannel rejected;

    @Test
    public void testCancellations() {
        CancellationRequest cancellationRequest = new CancellationRequest();
        cancellationRequest.setReservationCode("GOLD123456");
        input.send(MessageBuilder.withPayload(cancellationRequest).build());
        Message<?> confirmedMessage = confirmed.receive(0);
        assertNotNull(confirmedMessage);
        assertEquals(CancellationConfirmation.class, confirmedMessage.getPayload().getClass());
        CancellationConfirmation confirmation = (CancellationConfirmation) confirmedMessage.getPayload();
View Full Code Here

TOP

Related Classes of siia.booking.domain.cancellation.CancellationRequest$Requestor

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.