Examples of RegisterNewDestination


Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing.RegisterNewDestination

                        if( oldDestination.equals( destination ) )
                        {
                            throw new IllegalArgumentException( "Please select a new destination." );
                        }

                        new RegisterNewDestination( trackingId ).to( destination );

                        // Show updated cargo
                        setResponsePage( CargoDetailsPage.class, new PageParameters().set( 0, trackingId ) );
                    }
                    catch( CargoMisroutedException e )
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing.RegisterNewDestination

    public void precondition_x1_CannotChangeDestinationOfClaimedCargo()
        throws Exception
    {
        cargo.delivery().set( delivery( DAY1, CLAIMED, ROUTED, leg1 ) );
        thrown.expect( ChangeDestinationException.class, "Can't change destination of claimed cargo" );
        new RegisterNewDestination( cargo ).to( "USCHI" );
    }
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing.RegisterNewDestination

    {
        precondition_x1_CannotChangeDestinationOfClaimedCargo();

        cargo.delivery().set( delivery( DAY1, IN_PORT, ROUTED, leg1 ) );
        thrown.expect( ChangeDestinationException.class, "Didn't recognize location 'XXXXX'" );
        new RegisterNewDestination( cargo ).to( "XXXXX" );
    }
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing.RegisterNewDestination

    {
        deviation_1a_UnrecognizedLocation();

        cargo.delivery().set( delivery( DAY1, IN_PORT, ROUTED, leg1 ) );
        thrown.expect( ChangeDestinationException.class, "New destination is same as old destination." );
        new RegisterNewDestination( cargo ).to( "SESTO" );
    }
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing.RegisterNewDestination

        assertDelivery( null, null, null, null,
                        NOT_RECEIVED, notArrived,
                        NOT_ROUTED, directed, unknownETA, unknownLeg,
                        unknownNextHandlingEvent );

        new RegisterNewDestination( cargo ).to( "CNSHA" );

        assertRouteSpec( HONGKONG, SHANGHAI, TODAY, DAY24 );
        assertDelivery( null, null, null, null,
                        NOT_RECEIVED, notArrived,
                        NOT_ROUTED, directed, unknownETA, unknownLeg,
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing.RegisterNewDestination

        assertDelivery( null, null, null, null,
                        NOT_RECEIVED, notArrived,
                        ROUTED, directed, itinerary.eta(), leg1,
                        RECEIVE, HONGKONG, noSpecificDate, noVoyage );

        new RegisterNewDestination( cargo ).to( "CNSHA" );

        // Destination changed, deadline is the same
        assertRouteSpec( HONGKONG, SHANGHAI, TODAY, DAY24 );

        /**
 
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing.RegisterNewDestination

        assertDelivery( RECEIVE, HONGKONG, DAY1, noVoyage,
                        IN_PORT, notArrived,
                        ROUTED, directed, itinerary.eta(), leg1,
                        LOAD, HONGKONG, DAY1, V201 );

        new RegisterNewDestination( cargo ).to( "CNSHA" );

        assertRouteSpec( HONGKONG,  // Unchanged
                         SHANGHAI,  // New destination
                         DAY1,      // Completion time of last handling event
                         DAY24 );   // Unchanged
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing.RegisterNewDestination

                        ONBOARD_CARRIER, notArrived,
                        ROUTED, directed, itinerary.eta(), leg1,
                        UNLOAD, CHICAGO, DAY5, V201 );
        try
        {
            new RegisterNewDestination( cargo ).to( "CNSHA" );
            fail();
        }
        catch( CargoMisroutedException e )
        {
            assertMessage( e, "MISROUTED! Route specification is not satisfied with itinerary" );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing.RegisterNewDestination

                        IN_PORT, notArrived,
                        ROUTED, directed, itinerary.eta(), leg2,
                        LOAD, CHICAGO, DAY5, V201 );
        try
        {
            new RegisterNewDestination( cargo ).to( "CNSHA" );
            fail();
        }
        catch( CargoMisroutedException e )
        {
            assertMessage( e, "MISROUTED! Route specification is not satisfied with itinerary" );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.routing.RegisterNewDestination

        assertDelivery( CUSTOMS, CHICAGO, DAY5, noVoyage,
                        IN_PORT, notArrived,
                        ROUTED, directed, itinerary.eta(), leg2,
                        unknownNextHandlingEvent );

        new RegisterNewDestination( cargo ).to( "CNSHA" );

        assertRouteSpec( CHICAGO,   // Current location
                         SHANGHAI,  // New destination
                         DAY5,      // Last completion time
                         DAY24 );   // Unchanged
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.