Package siia.booking.domain.trip

Examples of siia.booking.domain.trip.Leg


    @Autowired
    Marshaller marshaller;

    @Before
    public void setUp() {
        this.exampleLegQuote = new LegQuoteCommand(new Leg(startLegDateTime, endLegDateTime, london, buenosAires));

        CarCriteria carCriteria = new CarCriteria();
        carCriteria.setCarType(CarType.Compact);
        this.exampleLegQuote.setCarCriteria(carCriteria);
View Full Code Here


    @Autowired PollableChannel tripQuotes;

    @Test
    public void shouldAggregateQuotedLegsIntoTripSuggestion() {
        Leg fakeLeg1 = mock(Leg.class);
        Leg fakeLeg2 = mock(Leg.class);
        Message<Leg> firstLegMessage =
                createLegMessage(fakeLeg1, 1, 2);
        Message<Leg> secondLegMessage =
                createLegMessage(fakeLeg2, 2, 2);
        legQuotes.send(firstLegMessage);
View Full Code Here

    }

    @Test
    public void testMarshallingLeg() throws Exception{
        long day = 24 * 60 * 60 * 1000;
        Leg leg = new Leg(new DateTime(day, ISOChronology.getInstanceUTC()), new DateTime(day * 2, ISOChronology.getInstanceUTC()),
                new Location("UK", "London"), new Location("US", "New York"));

        StringWriter writer = new StringWriter();
        StreamResult res = new StreamResult(writer);
        marshaller.marshal(leg, res);
View Full Code Here

    @Before
    public void setUp() {
        this.marshaller = new Jaxb2Marshaller();
        this.marshaller.setClassesToBeBound(new Class[]{LegQuoteCommand.class});
        this.exampleLegQuote = new LegQuoteCommand(new Leg(startLegDateTime, endLegDateTime, london, buenosAires));

        CarCriteria carCriteria = new CarCriteria();
        carCriteria.setCarType(CarType.Compact);
        this.exampleLegQuote.setCarCriteria(carCriteria);
View Full Code Here

            DateTime now = new DateTime();
            DateTime startOfLeg = now.plusDays(7);
            DateTime endOfLeg = now.plusDays(14);
            Location startLocation = new Location("EN", "London");
            Location endLocation = new Location("US", "New York");
            return new Leg(startOfLeg, endOfLeg, startLocation, endLocation);
        }
View Full Code Here

TOP

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

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.