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.InspectUnloadedCargo


        // Unexpected unload in previous unload location of itinerary.
        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY7, DAY7, trackingId, UNLOAD, NEWYORK, V201 );
        try
        {
            new InspectUnloadedCargo( cargo, handlingEvent ).inspect();
            fail();
        }
        catch( CargoMisdirectedException e )
        {
            assertMessage( e, "MISDIRECTED! Itinerary expected unload in USDAL" );
View Full Code Here


        cargo.delivery().set( delivery( TODAY, ONBOARD_CARRIER, ROUTED, leg3 ) );

        // Unexpected load in next load location of itinerary (onto expected voyage) - can't jump ahead in route plan.
        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY7, DAY7, trackingId, UNLOAD, GOTHENBURG, V202 );
        thrown.expect( CargoMisdirectedException.class, "MISDIRECTED! Itinerary expected unload in USDAL" );
        new InspectUnloadedCargo( cargo, handlingEvent ).inspect();
    }
View Full Code Here

        cargo.delivery().set( delivery( TODAY, ONBOARD_CARRIER, ROUTED, leg3 ) );

        // Unexpected load in unplanned location (onto expected voyage)
        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY7, DAY7, trackingId, UNLOAD, HAMBURG, V202 );
        thrown.expect( CargoMisdirectedException.class, "MISDIRECTED! Itinerary expected unload in USDAL" );
        new InspectUnloadedCargo( cargo, handlingEvent ).inspect();
    }
View Full Code Here

        cargo.itinerary().set( itinerary );
        cargo.delivery().set( delivery( TODAY, ONBOARD_CARRIER, ROUTED, leg3 ) );

        // Unload in expected location but from unexpected voyage - do we care? For now not.
        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY10, DAY10, trackingId, UNLOAD, DALLAS, V205 );
        new InspectUnloadedCargo( cargo, handlingEvent ).inspect();

        // Itinerary should have progressed to leg 4
        assertDelivery( UNLOAD, DALLAS, DAY10, V205,      // Itinerary expected: UNLOAD, DALLAS, DAY8, V202
                        IN_PORT, notArrived,
                        ROUTED, directed, itinerary.eta(), leg4,
View Full Code Here

        cargo.itinerary().set( itinerary );
        cargo.delivery().set( delivery( TODAY, ONBOARD_CARRIER, ROUTED, leg4 ) );

        // Expected unload in leg 4 unload location (Rotterdam)
        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY17, DAY17, trackingId, UNLOAD, ROTTERDAM, V202 );
        new InspectUnloadedCargo( cargo, handlingEvent ).inspect();

        // Itinerary should have progressed to leg 5
        Leg nextCarrierMovement = itinerary.leg( cargo.delivery().get().itineraryProgressIndex().get() );
        assertThat( nextCarrierMovement.loadLocation().get(), is( equalTo( ROTTERDAM ) ) );
        assertThat( nextCarrierMovement.loadTime().get(), is( equalTo( DAY20 ) ) );
View Full Code Here

TOP

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

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.