Examples of FlightNotification


Examples of siia.booking.domain.notifications.FlightNotification

    TripRepository mockedTripRepository;

    @Test
    public void shouldEnrichHeaderAndSendMessageForRelatedTrips() {
        final Flight flight = mock(Flight.class);
        final FlightNotification notification = new FlightNotification("Flight has been cancelled", flight);
        final Message<FlightNotification> testMessage = MessageBuilder.withPayload(notification).build();
        Trip trip1 = mock(Trip.class);
        Trip trip2 = mock(Trip.class);
        List<Trip> relatedTrips = asList(trip1, trip2);
        given(mockedTripRepository.findTripsRelatedTo(flight)).willReturn(relatedTrips);
View Full Code Here

Examples of siia.booking.domain.notifications.FlightNotification

    private final FlightToTripNotificationsSplitter splitter = new FlightToTripNotificationsSplitter();

    @Test
    public void shouldReturnTripNotificationForEachAffectedTrip() {
        FlightNotification flightNotification = new FlightNotification("Flight is cancelled", mock(Flight.class));
        List<Trip> affectedTrips = new ArrayList<Trip>(5);
        affectedTrips.add(new Trip(Collections.singletonList(mock(Leg.class))));
        List<TripNotification> notifications = splitter.generateTripNotificationsFrom(flightNotification, affectedTrips);
        for (TripNotification notification : notifications) {
            assertThat(affectedTrips, hasItem(notification.getTrip()));
View Full Code Here

Examples of siia.booking.domain.notifications.FlightNotification

    TripRepository mockedTripRepository;

    @Test
    public void shouldEnrichHeaderAndSendMessageForRelatedTrips() {
        final Flight flight = mock(Flight.class);
        final FlightNotification notification = new FlightNotification("Flight has been cancelled", flight);
        final Message<FlightNotification> testMessage = MessageBuilder.withPayload(notification).build();
        Trip trip1 = mock(Trip.class);
        Trip trip2 = mock(Trip.class);
        List<Trip> relatedTrips = asList(trip1, trip2);
        given(mockedTripRepository.findTripsRelatedTo(flight)).willReturn(relatedTrips);
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.