Examples of BookNewCargo


Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.BookNewCargo

    public void deviation_4a_TrackingIdWithWrongCharacter()
        throws Exception
    {
        deviation_4a_TrackingIdNotTooLong();
        thrown.expect( ConstraintViolationException.class, "for value 'Göteborg1234'" );
        new BookNewCargo( CARGOS, HONGKONG, STOCKHOLM, DAY24 ).withTrackingId( "Göteborg1234" );
    }
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.BookNewCargo

    public void deviation_4b_TrackingIdNotUnique()
        throws Exception
    {
        deviation_4a_TrackingIdWithWrongCharacter();
        thrown.expect( CannotCreateCargoException.class, "Tracking id 'yes' is not unique." );
        new BookNewCargo( CARGOS, HONGKONG, STOCKHOLM, DAY24 ).withTrackingId( "yes" );
    }
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.BookNewCargo

    @Test
    public void step_4_CanAutoCreateTrackingIdFromEmptyString()
        throws Exception
    {
        deviation_4b_TrackingIdNotUnique();
        new BookNewCargo( CARGOS, HONGKONG, STOCKHOLM, DAY24 ).withTrackingId( "" );
    }
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.BookNewCargo

    @Test
    public void step_4_CanAutoCreateTrackingIdFromNull()
        throws Exception
    {
        step_4_CanAutoCreateTrackingIdFromEmptyString();
        new BookNewCargo( CARGOS, HONGKONG, STOCKHOLM, DAY24 ).withTrackingId( null );
    }
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.BookNewCargo

    public void success_BookNewCargo()
        throws Exception
    {
        step_4_CanAutoCreateTrackingIdFromNull();
        UnitOfWork uow = module.currentUnitOfWork();
        trackingId = new BookNewCargo( CARGOS, HONGKONG, STOCKHOLM, DAY24 ).withTrackingId( "ABC" );
        cargo = uow.get( CargoEntity.class, trackingId.id().get() );

        assertThat( cargo.trackingId().get(), is( equalTo( trackingId ) ) );
        assertThat( cargo.trackingId().get().id().get(), is( equalTo( "ABC" ) ) );
        assertThat( cargo.origin().get(), is( equalTo( HONGKONG ) ) );
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.