Examples of routingStatus()


Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.delivery.Delivery.routingStatus()

        // Expected receipt in Hong Kong
        HandlingEvent handlingEvent = HANDLING_EVENTS.createHandlingEvent( day( 1 ), day( 1 ), trackingId, HandlingEventType.RECEIVE, HONGKONG, null );
        Delivery delivery = new BuildDeliverySnapshot( cargo, handlingEvent ).get();

        assertThat( delivery.isMisdirected().get(), is( equalTo( false ) ) );
        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.ROUTED ) ) );
        assertThat( delivery.transportStatus().get(), is( equalTo( TransportStatus.IN_PORT ) ) );
        assertThat( delivery.lastHandlingEvent().get(), is( equalTo( handlingEvent ) ) );
        assertThat( delivery.lastKnownLocation().get(), is( equalTo( HONGKONG ) ) );

        // We expect the cargo to be loaded on voyage V100S in Hong Kong
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.delivery.Delivery.routingStatus()

        assertThat( delivery.isMisdirected().get(), is( equalTo( true ) ) );
        assertThat( delivery.nextExpectedHandlingEvent().get(), is( equalTo( null ) ) );
        assertThat( delivery.eta().get(), is( equalTo( null ) ) );

        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.ROUTED ) ) );
        assertThat( delivery.transportStatus().get(), is( equalTo( TransportStatus.ONBOARD_CARRIER ) ) );
        assertThat( delivery.lastHandlingEvent().get(), is( equalTo( handlingEvent ) ) );
        assertThat( delivery.lastKnownLocation().get(), is( equalTo( TOKYO ) ) );
        assertThat( delivery.currentVoyage().get(), is( equalTo( V100S ) ) );
    }
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.delivery.Delivery.routingStatus()

        // Expected load in Hong Kong
        HandlingEvent handlingEvent = HANDLING_EVENTS.createHandlingEvent( day( 1 ), day( 1 ), trackingId, LOAD, HONGKONG, V100S );
        Delivery delivery = new BuildDeliverySnapshot( cargo, handlingEvent ).get();

        assertThat( delivery.isMisdirected().get(), is( equalTo( false ) ) );
        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.ROUTED ) ) );
        assertThat( delivery.transportStatus().get(), is( equalTo( TransportStatus.ONBOARD_CARRIER ) ) );
        assertThat( delivery.lastHandlingEvent().get(), is( equalTo( handlingEvent ) ) );
        assertThat( delivery.lastKnownLocation().get(), is( equalTo( HONGKONG ) ) );
        assertThat( delivery.currentVoyage().get(), is( equalTo( V100S ) ) );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.delivery.Delivery.routingStatus()

        assertThat( delivery.isMisdirected().get(), is( equalTo( true ) ) );
        assertThat( delivery.nextExpectedHandlingEvent().get(), is( equalTo( null ) ) );
        assertThat( delivery.eta().get(), is( equalTo( null ) ) );

        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.ROUTED ) ) );
        assertThat( delivery.transportStatus().get(), is( equalTo( TransportStatus.ONBOARD_CARRIER ) ) );
        assertThat( delivery.lastHandlingEvent().get(), is( equalTo( handlingEvent ) ) );
        assertThat( delivery.lastKnownLocation().get(), is( equalTo( HONGKONG ) ) );
        assertThat( delivery.currentVoyage().get(), is( equalTo( V400S ) ) );
    }
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.delivery.Delivery.routingStatus()

        Delivery delivery = new BuildDeliverySnapshot( cargo, handlingEvent ).get();

        // Should have been true, but we accept it for now...
        assertThat( delivery.isMisdirected().get(), is( equalTo( false ) ) );

        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.ROUTED ) ) );
        assertThat( delivery.transportStatus().get(), is( equalTo( TransportStatus.ONBOARD_CARRIER ) ) );
        assertThat( delivery.lastHandlingEvent().get(), is( equalTo( handlingEvent ) ) );
        assertThat( delivery.lastKnownLocation().get(), is( equalTo( NEWYORK ) ) );
        assertThat( delivery.currentVoyage().get(), is( equalTo( V200T ) ) );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.delivery.Delivery.routingStatus()

        assertThat( delivery.isMisdirected().get(), is( equalTo( true ) ) );
        assertThat( delivery.nextExpectedHandlingEvent().get(), is( equalTo( null ) ) );
        assertThat( delivery.eta().get(), is( equalTo( null ) ) );

        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.ROUTED ) ) );
        assertThat( delivery.transportStatus().get(), is( equalTo( TransportStatus.IN_PORT ) ) );
        assertThat( delivery.lastHandlingEvent().get(), is( equalTo( handlingEvent ) ) );
        assertThat( delivery.lastHandlingEvent().get().handlingEventType().get(), is( equalTo( UNLOAD ) ) );
        assertThat( delivery.lastHandlingEvent().get().voyage().get(), is( equalTo( V100S ) ) );
        assertThat( delivery.lastKnownLocation().get(), is( equalTo( TOKYO ) ) );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.delivery.Delivery.routingStatus()

        cargo.delivery().set( delivery );

        // Old itinerary will not satisfy new route specification
        assertThat( itinerary.firstLeg().loadLocation().get(), is( not( equalTo( routeSpec.origin().get() ) ) ) );
        assertThat( itinerary.lastLeg().unloadLocation().get(), is( equalTo( routeSpec.destination().get() ) ) );
        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.MISROUTED ) ) );

        // Old planned arrival time is still satisfying new deadline
        assertTrue( routeSpec.arrivalDeadline().get().after( itinerary.finalArrivalDate() ) );

        // We don't know what's next before a new itinerary has been chosen
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.delivery.Delivery.routingStatus()

        new BookNewCargo( cargo, itinerary ).assignCargoToRoute();
        delivery = cargo.delivery().get();

        // Cargo is on track again
        assertThat( delivery.isMisdirected().get(), is( equalTo( false ) ) );
        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.ROUTED ) ) );
        assertThat( delivery.transportStatus().get(), is( equalTo( TransportStatus.IN_PORT ) ) );
        assertThat( delivery.lastHandlingEvent().get(), is( equalTo( handlingEvent ) ) );
        assertThat( delivery.lastHandlingEvent().get().handlingEventType().get(), is( equalTo( UNLOAD ) ) );
        assertThat( delivery.lastHandlingEvent().get().voyage().get(), is( equalTo( V100S ) ) );
        assertThat( delivery.lastKnownLocation().get(), is( equalTo( TOKYO ) ) );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.delivery.Delivery.routingStatus()

        // Unload at midpoint location of itinerary
        HandlingEvent handlingEvent = HANDLING_EVENTS.createHandlingEvent( day( 8 ), day( 8 ), trackingId, UNLOAD, HAMBURG, V400S );
        Delivery delivery = new BuildDeliverySnapshot( cargo, handlingEvent ).get();

        assertThat( delivery.isMisdirected().get(), is( equalTo( false ) ) );
        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.ROUTED ) ) );
        assertThat( delivery.transportStatus().get(), is( equalTo( TransportStatus.IN_PORT ) ) );
        assertThat( delivery.lastHandlingEvent().get(), is( equalTo( handlingEvent ) ) );
        assertThat( delivery.lastKnownLocation().get(), is( equalTo( HAMBURG ) ) );
        assertThat( delivery.currentVoyage().get(), is( equalTo( null ) ) );
        assertThat( delivery.isUnloadedAtDestination().get(), is( equalTo( false ) ) );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.delivery.Delivery.routingStatus()

        // Unload at destination
        HandlingEvent handlingEvent = HANDLING_EVENTS.createHandlingEvent( day( 16 ), day( 16 ), trackingId, UNLOAD, STOCKHOLM, V500S );
        Delivery delivery = new BuildDeliverySnapshot( cargo, handlingEvent ).get();

        assertThat( delivery.isMisdirected().get(), is( equalTo( false ) ) );
        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.ROUTED ) ) );
        assertThat( delivery.transportStatus().get(), is( equalTo( TransportStatus.IN_PORT ) ) );
        assertThat( delivery.lastHandlingEvent().get(), is( equalTo( handlingEvent ) ) );
        assertThat( delivery.lastKnownLocation().get(), is( equalTo( STOCKHOLM ) ) );
        assertThat( delivery.currentVoyage().get(), is( equalTo( null ) ) );
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.