Examples of lastKnownLocation()


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

        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 ) ) );

        // We expect the cargo to be unloaded from voyage V200T in Dallas
        assertThat( delivery.nextExpectedHandlingEvent().get().handlingEventType().get(), is( equalTo( UNLOAD ) ) );
        assertThat( delivery.nextExpectedHandlingEvent().get().location().get(), is( equalTo( DALLAS ) ) );
View Full Code Here

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

        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 ) ) );
        assertThat( delivery.currentVoyage().get(), is( equalTo( null ) ) );
        assertThat( delivery.isUnloadedAtDestination().get(), is( equalTo( false ) ) );

        // Cargo needs to be rerouted
View Full Code Here

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

        // Last known data
        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 ) ) );
        assertThat( delivery.currentVoyage().get(), is( equalTo( null ) ) );
        assertThat( delivery.isUnloadedAtDestination().get(), is( equalTo( false ) ) );

        // New itinerary that satisfy the new route specification. New origin departure from Tokyo.
        Date arrival= day( 19 );
View Full Code Here

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

        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 ) ) );
        assertThat( delivery.currentVoyage().get(), is( equalTo( null ) ) );
        assertThat( delivery.eta().get(), is( equalTo( arrival ) ) );
        assertThat( delivery.isUnloadedAtDestination().get(), is( equalTo( false ) ) );

        // When a cargo is rerouted the (often misdirected) last handling event is flagged as disregarded
View Full Code Here

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

        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 ) ) );

        // We expect the cargo to be loaded onto voyage V200T in New York heading for Dallas
        assertThat( delivery.nextExpectedHandlingEvent().get().handlingEventType().get(), is( equalTo( LOAD ) ) );
View Full Code Here

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

        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 ) ) );

        // Cargo has arrived at destination location
        assertThat( delivery.isUnloadedAtDestination().get(), is( equalTo( true ) ) );
View Full Code Here

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

        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 ) ) );

        // Cargo might be at destination, but the last handling event wasn't unloading
        assertThat( delivery.isUnloadedAtDestination().get(), is( equalTo( true ) ) );
View Full Code Here

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

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

        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.ROUTED ) ) );
        assertThat( delivery.transportStatus().get(), is( equalTo( TransportStatus.CLAIMED ) ) );
        assertThat( delivery.lastHandlingEvent().get(), is( equalTo( handlingEvent ) ) );
        assertThat( delivery.lastKnownLocation().get(), is( equalTo( HELSINKI ) ) );
        assertThat( delivery.currentVoyage().get(), is( equalTo( null ) ) );

        // Cargo is claimed but has not arrived yet in destination port
        assertThat( delivery.isUnloadedAtDestination().get(), is( equalTo( false ) ) );
    }
View Full Code Here

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

        assertThat( delivery.isMisdirected().get(), is( equalTo( false ) ) );
        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.ROUTED ) ) );
        assertThat( delivery.transportStatus().get(), is( equalTo( TransportStatus.CLAIMED ) ) );
        assertThat( delivery.lastHandlingEvent().get(), is( equalTo( handlingEvent ) ) );
        assertThat( delivery.lastKnownLocation().get(), is( equalTo( STOCKHOLM ) ) );
        assertThat( delivery.currentVoyage().get(), is( equalTo( null ) ) );

        // Cargo is claimed in destination port
        assertThat( delivery.isUnloadedAtDestination().get(), is( equalTo( true ) ) );
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.