use of org.qi4j.sample.dcicargo.sample_b.data.aggregateroot.CargoAggregateRoot in project qi4j-sdk by Qi4j.
the class InspectReceivedCargoTest method prepareTest.
@Before
public void prepareTest() throws Exception {
super.prepareTest();
UnitOfWork uow = module.currentUnitOfWork();
HANDLING_EVENTS = uow.get(HandlingEventAggregateRoot.class, HandlingEventAggregateRoot.HANDLING_EVENTS_ID);
CargoAggregateRoot CARGOS = uow.get(CargoAggregateRoot.class, CargoAggregateRoot.CARGOS_ID);
// Create new cargo
routeSpec = routeSpecFactory.build(HONGKONG, STOCKHOLM, TODAY, deadline = DAY24);
delivery = delivery(TODAY, NOT_RECEIVED, NOT_ROUTED, unknownLeg);
cargo = CARGOS.createCargo(routeSpec, delivery, "Received_CARGO");
trackingId = cargo.trackingId().get();
}
Aggregations