Package siia.booking.domain.trip

Examples of siia.booking.domain.trip.Trip


    @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);
        flightNotifications.send(testMessage);
        Message<TripNotification> tripNotificationMessage1 =
                (Message<TripNotification>) interceptedTripNotifications.receive(1000);
View Full Code Here


    @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

* @author Iwein Fuld
*/
public class LegQuoteAggregator {

    public Trip suggestTripFromQuotes(List<Leg> legs){
        return new Trip(legs);
    }
View Full Code Here

    @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);
        flightNotifications.send(testMessage);
        Message<TripNotification> tripNotificationMessage1 =
                (Message<TripNotification>) interceptedTripNotifications.receive(1000);
View Full Code Here

TOP

Related Classes of siia.booking.domain.trip.Trip

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.