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


        // Unexpected load in previous load location of itinerary (onto expected voyage) - can't go back in time.
        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY7, DAY5, trackingId, LOAD, ROTTERDAM, V202 );
        try
        {
            new InspectLoadedCargo( cargo, handlingEvent ).inspect();
            fail();
        }
        catch( CargoMisdirectedException e )
        {
            assertMessage( e, "MISDIRECTED! Itinerary expected load in New York (USNYC)" );
View Full Code Here


        // Unexpected load onto previous voyage (in expected location) - can't go back in time.
        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY7, DAY7, trackingId, LOAD, NEWYORK, V201 );
        try
        {
            new InspectLoadedCargo( cargo, handlingEvent ).inspect();
            fail();
        }
        catch( CargoMisdirectedException e )
        {
            assertMessage( e, "MISDIRECTED! Itinerary expected load onto voyage V202" );
View Full Code Here

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

        // Unexpected load onto future voyage (in expected location) - can't jump ahead in route plan.
        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY7, DAY7, trackingId, LOAD, NEWYORK, V203 );
        thrown.expect( CargoMisdirectedException.class, "MISDIRECTED! Itinerary expected load onto voyage V202" );
        new InspectLoadedCargo( cargo, handlingEvent ).inspect();
    }
View Full Code Here

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

        // Unexpected load onto voyage not in itinerary
        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY7, DAY7, trackingId, LOAD, NEWYORK, V204 );
        thrown.expect( CargoMisdirectedException.class, "MISDIRECTED! Itinerary expected load onto voyage V202" );
        new InspectLoadedCargo( cargo, handlingEvent ).inspect();
    }
View Full Code Here

        // Unexpected load onto voyage not in itinerary - but the carrier is going to our expected arrival location!
        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY9, DAY9, trackingId, LOAD, NEWYORK, V205 );
        try
        {
            new InspectLoadedCargo( cargo, handlingEvent ).inspect();
            fail();
        }
        catch( CargoMisdirectedException e )
        {
            assertMessage( e, "MISDIRECTED! Cargo is heading to expected arrival location USDAL but on unexpected voyage V205" );
View Full Code Here

        // Expected load onto voyage - but carrier has changed arrival location!
        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY7, DAY7, trackingId, LOAD, NEWYORK, V202 );
        try
        {
            new InspectLoadedCargo( cargo, handlingEvent ).inspect();
            fail();
        }
        catch( CargoMisdirectedException e )
        {
            assertMessage( e, "MISDIRECTED! Itinerary expects voyage V202 to arrive in USDAL but carrier is now going to DEHAM" );
View Full Code Here

            carrierMovement( ROTTERDAM, GOTHENBURG, DAY17, DAY19 )
        ) );

        // Expected load (leg 3)
        handlingEvent = HANDLING_EVENTS.createHandlingEvent( DAY7, DAY7, trackingId, LOAD, NEWYORK, V202 );
        new InspectLoadedCargo( cargo, handlingEvent ).inspect();

        Leg currentCarrierMovement = itinerary.leg( delivery.itineraryProgressIndex().get() );
        assertThat( currentCarrierMovement.unloadLocation().get(), is( equalTo( DALLAS ) ) );
        assertThat( currentCarrierMovement.unloadTime().get(), is( equalTo( DAY8 ) ) );
        assertThat( currentCarrierMovement.voyage().get(), is( equalTo( V202 ) ) );
View Full Code Here

                        ONBOARD_CARRIER, notArrived,
                        ROUTED, directed, itinerary.eta(), leg1,
                        UNLOAD, MOGADISHU, DAY2, V205 );
        try
        {
            new InspectLoadedCargo( cargo, handlingEvent ).inspect();
        }
        catch( CargoHijackedException e )
        {
            assertMessage( e, "Cargo 'Naive' was hijacked." );
            assertDelivery( LOAD, HANGZHOU, DAY1, V205,
View Full Code Here

                        ONBOARD_CARRIER, notArrived,
                        ROUTED, directed, itinerary.eta(), leg2,
                        UNLOAD, ROTTERDAM, DAY4, V205 );
        try
        {
            new InspectLoadedCargo( cargo, handlingEvent ).inspect();
        }
        catch( CargoHijackedException e )
        {
            assertMessage( e, "Cargo 'Hopeful' was hijacked." );
            assertDelivery( LOAD, MOGADISHU, DAY2, V205,
View Full Code Here

TOP

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

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.