Package org.qi4j.sample.dcicargo.sample_b.context.interaction.handling.inspection.event

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.handling.inspection.event.InspectUnhandledCargo


                // Step 1 - Determine handling event type

                if( c.handlingEvent == null )
                {
                    new InspectUnhandledCargo( cargo ).inspect();
                    return;
                }
                HandlingEventType handlingEventType = c.handlingEvent.handlingEventType().get();

                // Step 2 - Delegate inspection
View Full Code Here


                        final RouteSpecification unsatisfiedRouteSpec =
                            routeSpecFactory.build( origin, badDest, new Date(), new DateTime().plusDays( 25 )
                                .toDate() );
                        cargo.routeSpecification().set( unsatisfiedRouteSpec );

                        new InspectUnhandledCargo( cargo ).inspect();
                    }

                    // RECEIVE
                    if( i > 13 )
                    {
View Full Code Here

        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY1, DAY1, trackingId, RECEIVE, HONGKONG, noVoyage );
        cargo.delivery().set( delivery( handlingEvent, IN_PORT, notArrived,
                                        ROUTED, directed, itinerary.eta(), leg1, unknownNextHandlingEvent ) );
        try
        {
            new InspectUnhandledCargo( cargo ).inspect();
            fail();
        }
        catch( InspectionFailedException e )
        {
            assertMessage( e, "INTERNAL ERROR: Can only inspect unhandled cargo" );
View Full Code Here

    {
        // Cargo not routed
        cargo.itinerary().set( null );
        cargo.delivery().set( delivery( TODAY, NOT_RECEIVED, NOT_ROUTED, leg1 ) );

        new InspectUnhandledCargo( cargo ).inspect();

        assertDelivery( null, null, null, null,
                        NOT_RECEIVED, notArrived,
                        NOT_ROUTED, directed, unknownETA, unknownLeg,
                        RECEIVE, HONGKONG, noSpecificDate, noVoyage );
View Full Code Here

    {
        // Misroute cargo - assign unsatisfying itinerary not going to Stockholm
        cargo.itinerary().set( wrongItinerary );
        cargo.delivery().set( delivery( TODAY, NOT_RECEIVED, MISROUTED, leg1 ) );

        new InspectUnhandledCargo( cargo ).inspect();

        assertDelivery( null, null, null, null,
                        NOT_RECEIVED, notArrived,
                        MISROUTED, directed, unknownETA, unknownLeg,
                        RECEIVE, HONGKONG, noSpecificDate, noVoyage );
View Full Code Here

    {
        // Assign satisfying route going to Stockholm
        cargo.itinerary().set( itinerary );
        cargo.delivery().set( delivery( TODAY, NOT_RECEIVED, ROUTED, leg1 ) );

        new InspectUnhandledCargo( cargo ).inspect();

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

TOP

Related Classes of org.qi4j.sample.dcicargo.sample_b.context.interaction.handling.inspection.event.InspectUnhandledCargo

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.