|
|
@@ -5,9 +5,9 @@ import static org.easymock.EasyMock.*;
|
|
5
|
5
|
import se.citerus.dddsample.domain.model.cargo.Cargo;
|
|
6
|
6
|
import se.citerus.dddsample.domain.model.cargo.CargoRepository;
|
|
7
|
7
|
import se.citerus.dddsample.domain.model.cargo.TrackingId;
|
|
8
|
|
-import se.citerus.dddsample.domain.model.carrier.CarrierMovement;
|
|
9
|
8
|
import se.citerus.dddsample.domain.model.carrier.CarrierMovementId;
|
|
10
|
9
|
import se.citerus.dddsample.domain.model.carrier.CarrierMovementRepository;
|
|
|
10
|
+import se.citerus.dddsample.domain.model.carrier.SampleCarrierMovements;
|
|
11
|
11
|
import se.citerus.dddsample.domain.model.handling.HandlingEvent;
|
|
12
|
12
|
import se.citerus.dddsample.domain.model.handling.HandlingEventRepository;
|
|
13
|
13
|
import se.citerus.dddsample.domain.model.location.LocationRepository;
|
|
|
@@ -29,9 +29,6 @@ public class HandlingEventServiceTest extends TestCase {
|
|
29
|
29
|
|
|
30
|
30
|
private final Cargo cargoXYZ = new Cargo(new TrackingId("XYZ"), HONGKONG, HELSINKI);
|
|
31
|
31
|
|
|
32
|
|
- private final CarrierMovement cmAAA_BBB = new CarrierMovement(
|
|
33
|
|
- new CarrierMovementId("CAR_001"), CHICAGO, STOCKHOLM);
|
|
34
|
|
-
|
|
35
|
32
|
protected void setUp() throws Exception{
|
|
36
|
33
|
service = new HandlingEventServiceImpl();
|
|
37
|
34
|
cargoRepository = createMock(CargoRepository.class);
|
|
|
@@ -58,7 +55,7 @@ public class HandlingEventServiceTest extends TestCase {
|
|
58
|
55
|
expect(cargoRepository.find(trackingId)).andReturn(cargoABC);
|
|
59
|
56
|
|
|
60
|
57
|
final CarrierMovementId carrierMovementId = new CarrierMovementId("AAA_BBB");
|
|
61
|
|
- expect(carrierMovementRepository.find(carrierMovementId)).andReturn(cmAAA_BBB);
|
|
|
58
|
+ expect(carrierMovementRepository.find(carrierMovementId)).andReturn(SampleCarrierMovements.CM001);
|
|
62
|
59
|
|
|
63
|
60
|
final UnLocode unLocode = new UnLocode("SESTO");
|
|
64
|
61
|
expect(locationRepository.find(unLocode)).andReturn(STOCKHOLM);
|