Kaynağa Gözat

Brought tests up to speed with code changes.

peter_backlund 18 yıl önce
ebeveyn
işleme
fbcada7479

+ 1
- 1
dddsample/pom.xml Dosyayı Görüntüle

128
           </execution>
128
           </execution>
129
         </executions>
129
         </executions>
130
         <configuration>
130
         <configuration>
131
-          <sei>se.citerus.dddsample.interfaces.handling.HandlingEventServiceEndpointImpl</sei>
131
+          <sei>se.citerus.dddsample.interfaces.handling.ws.HandlingReportServiceImpl</sei>
132
           <genWsdl>true</genWsdl>
132
           <genWsdl>true</genWsdl>
133
         </configuration>
133
         </configuration>
134
       </plugin>
134
       </plugin>

+ 3
- 2
dddsample/src/test/java/se/citerus/dddsample/application/HandlingEventServiceTest.java Dosyayı Görüntüle

5
 import se.citerus.dddsample.application.impl.HandlingEventServiceImpl;
5
 import se.citerus.dddsample.application.impl.HandlingEventServiceImpl;
6
 import se.citerus.dddsample.domain.model.cargo.Cargo;
6
 import se.citerus.dddsample.domain.model.cargo.Cargo;
7
 import se.citerus.dddsample.domain.model.cargo.CargoRepository;
7
 import se.citerus.dddsample.domain.model.cargo.CargoRepository;
8
+import se.citerus.dddsample.domain.model.cargo.RouteSpecification;
8
 import se.citerus.dddsample.domain.model.cargo.TrackingId;
9
 import se.citerus.dddsample.domain.model.cargo.TrackingId;
9
 import se.citerus.dddsample.domain.model.carrier.SampleVoyages;
10
 import se.citerus.dddsample.domain.model.carrier.SampleVoyages;
10
 import se.citerus.dddsample.domain.model.carrier.VoyageNumber;
11
 import se.citerus.dddsample.domain.model.carrier.VoyageNumber;
28
   private LocationRepository locationRepository;
29
   private LocationRepository locationRepository;
29
   private HandlingEventFactory handlingEventFactory;
30
   private HandlingEventFactory handlingEventFactory;
30
 
31
 
31
-  private final Cargo cargoABC = new Cargo(new TrackingId("ABC"), HAMBURG, TOKYO);
32
+  private final Cargo cargoABC = new Cargo(new TrackingId("ABC"), new RouteSpecification(HAMBURG, TOKYO, new Date()));
32
 
33
 
33
-  private final Cargo cargoXYZ = new Cargo(new TrackingId("XYZ"), HONGKONG, HELSINKI);
34
+  private final Cargo cargoXYZ = new Cargo(new TrackingId("XYZ"), new RouteSpecification(HONGKONG, HELSINKI, new Date()));
34
 
35
 
35
   protected void setUp() throws Exception{
36
   protected void setUp() throws Exception{
36
     cargoRepository = createMock(CargoRepository.class);
37
     cargoRepository = createMock(CargoRepository.class);

+ 2
- 2
dddsample/src/test/java/se/citerus/dddsample/application/RoutingServiceTest.java Dosyayı Görüntüle

46
 
46
 
47
   public void testCalculatePossibleRoutes() {
47
   public void testCalculatePossibleRoutes() {
48
     TrackingId trackingId = new TrackingId("ABC");
48
     TrackingId trackingId = new TrackingId("ABC");
49
-    Cargo cargo = new Cargo(trackingId, HONGKONG, HELSINKI);
50
-    RouteSpecification routeSpecification = new RouteSpecification(cargo.origin(), cargo.destination(), new Date());
49
+    RouteSpecification routeSpecification = new RouteSpecification(HONGKONG, HELSINKI, new Date());
50
+    Cargo cargo = new Cargo(trackingId, routeSpecification);
51
 
51
 
52
     expect(voyageRepository.find(isA(VoyageNumber.class))).andStubReturn(SampleVoyages.CM002);
52
     expect(voyageRepository.find(isA(VoyageNumber.class))).andStubReturn(SampleVoyages.CM002);
53
     
53
     

+ 8
- 9
dddsample/src/test/java/se/citerus/dddsample/domain/model/cargo/CargoTest.java Dosyayı Görüntüle

2
 
2
 
3
 import junit.framework.TestCase;
3
 import junit.framework.TestCase;
4
 import static se.citerus.dddsample.domain.model.cargo.RoutingStatus.*;
4
 import static se.citerus.dddsample.domain.model.cargo.RoutingStatus.*;
5
-import se.citerus.dddsample.domain.model.carrier.CarrierMovement;
6
-import se.citerus.dddsample.domain.model.carrier.Schedule;
7
 import se.citerus.dddsample.domain.model.carrier.Voyage;
5
 import se.citerus.dddsample.domain.model.carrier.Voyage;
8
 import se.citerus.dddsample.domain.model.carrier.VoyageNumber;
6
 import se.citerus.dddsample.domain.model.carrier.VoyageNumber;
9
 import se.citerus.dddsample.domain.model.handling.HandlingEvent;
7
 import se.citerus.dddsample.domain.model.handling.HandlingEvent;
23
   protected void setUp() throws Exception {
21
   protected void setUp() throws Exception {
24
     events = new HashSet<HandlingEvent>();
22
     events = new HashSet<HandlingEvent>();
25
 
23
 
26
-    voyage = new Voyage(new VoyageNumber("0123"), new Schedule(Arrays.asList(
27
-      new CarrierMovement(STOCKHOLM, HAMBURG, new Date(), new Date()),
28
-      new CarrierMovement(HAMBURG, HONGKONG, new Date(), new Date()),
29
-      new CarrierMovement(HONGKONG, MELBOURNE, new Date(), new Date())
30
-    )));
24
+    voyage = new Voyage.Builder(new VoyageNumber("0123"), STOCKHOLM).
25
+      addMovement(HAMBURG, new Date(), new Date()).
26
+      addMovement(HONGKONG, new Date(), new Date()).
27
+      addMovement(MELBOURNE, new Date(), new Date()).
28
+      build();
31
   }
29
   }
32
 
30
 
33
   public void testRoutingStatus() throws Exception {
31
   public void testRoutingStatus() throws Exception {
118
     cargo.setDeliveryHistory(new Delivery(events));
116
     cargo.setDeliveryHistory(new Delivery(events));
119
     assertFalse(cargo.isUnloadedAtDestination());
117
     assertFalse(cargo.isUnloadedAtDestination());
120
 
118
 
121
-    CarrierMovement cm1 = new CarrierMovement(HANGZOU, NEWYORK, new Date(), new Date());
122
-    Voyage voyage = new Voyage(new VoyageNumber("0123"), new Schedule(Arrays.asList(cm1)));
119
+    Voyage voyage = new Voyage.Builder(new VoyageNumber("0123"), HANGZOU).
120
+      addMovement(NEWYORK, new Date(), new Date()).
121
+      build();
123
 
122
 
124
     // Adding an unload event, but not at the final destination
123
     // Adding an unload event, but not at the final destination
125
     events.add(
124
     events.add(

+ 12
- 9
dddsample/src/test/java/se/citerus/dddsample/domain/model/cargo/ItineraryTest.java Dosyayı Görüntüle

2
 
2
 
3
 import junit.framework.TestCase;
3
 import junit.framework.TestCase;
4
 import se.citerus.dddsample.domain.model.carrier.CarrierMovement;
4
 import se.citerus.dddsample.domain.model.carrier.CarrierMovement;
5
-import se.citerus.dddsample.domain.model.carrier.Schedule;
6
 import se.citerus.dddsample.domain.model.carrier.Voyage;
5
 import se.citerus.dddsample.domain.model.carrier.Voyage;
7
 import se.citerus.dddsample.domain.model.carrier.VoyageNumber;
6
 import se.citerus.dddsample.domain.model.carrier.VoyageNumber;
8
 import se.citerus.dddsample.domain.model.handling.HandlingEvent;
7
 import se.citerus.dddsample.domain.model.handling.HandlingEvent;
22
   Voyage voyage, wrongVoyage;
21
   Voyage voyage, wrongVoyage;
23
 
22
 
24
   protected void setUp() throws Exception {
23
   protected void setUp() throws Exception {
25
-    voyage = new Voyage(new VoyageNumber("0123"), new Schedule(Arrays.asList(
26
-      abc, def, ghi, jkl
27
-    )));
28
-    wrongVoyage = new Voyage(new VoyageNumber("666"), new Schedule(Arrays.asList(
29
-      new CarrierMovement(NEWYORK, STOCKHOLM, new Date(), new Date()),
30
-      new CarrierMovement(STOCKHOLM, HELSINKI, new Date(), new Date())
31
-    )));
24
+    voyage = new Voyage.Builder(new VoyageNumber("0123"), SHANGHAI).
25
+      addMovement(ROTTERDAM, new Date(), new Date()).
26
+      addMovement(GOTHENBURG, new Date(), new Date()).
27
+      build();
28
+
29
+    wrongVoyage = new Voyage.Builder(new VoyageNumber("666"), NEWYORK).
30
+      addMovement(STOCKHOLM, new Date(), new Date()).
31
+      addMovement(HELSINKI, new Date(), new Date()).
32
+      build();
32
   }
33
   }
33
 
34
 
34
   public void testCargoOnTrack() throws Exception {
35
   public void testCargoOnTrack() throws Exception {
35
 
36
 
36
-    Cargo cargo = new Cargo(new TrackingId("CARGO1"), SHANGHAI, GOTHENBURG);
37
+    TrackingId trackingId = new TrackingId("CARGO1");
38
+    RouteSpecification routeSpecification = new RouteSpecification(SHANGHAI, GOTHENBURG, new Date());
39
+    Cargo cargo = new Cargo(trackingId, routeSpecification);
37
 
40
 
38
     Itinerary itinerary = new Itinerary(
41
     Itinerary itinerary = new Itinerary(
39
       Arrays.asList(
42
       Arrays.asList(

+ 2
- 8
dddsample/src/test/java/se/citerus/dddsample/domain/model/cargo/RouteSpecificationTest.java Dosyayı Görüntüle

8
 
8
 
9
 public class RouteSpecificationTest extends TestCase {
9
 public class RouteSpecificationTest extends TestCase {
10
 
10
 
11
-  private Cargo cargo;
12
-
13
-  public void setUp() {
14
-    cargo = new Cargo(new TrackingId("AAA"), HONGKONG, CHICAGO);
15
-  }
16
-
17
   public void testIsSatisfiedBySuccess() {
11
   public void testIsSatisfiedBySuccess() {
18
-    RouteSpecification spec = new RouteSpecification(cargo.origin(), cargo.destination(), new Date());
12
+    RouteSpecification routeSpecification = new RouteSpecification(HONGKONG, CHICAGO, new Date());
19
     Itinerary itinerary = new Itinerary();
13
     Itinerary itinerary = new Itinerary();
20
-    assertTrue(spec.isSatisfiedBy(itinerary));
14
+    assertTrue(routeSpecification.isSatisfiedBy(itinerary));
21
   }
15
   }
22
 
16
 
23
   public void testIsSatisfiedByInvalidDate() {
17
   public void testIsSatisfiedByInvalidDate() {

+ 3
- 1
dddsample/src/test/java/se/citerus/dddsample/domain/model/handling/HandlingEventFactoryTest.java Dosyayı Görüntüle

4
 import static org.easymock.EasyMock.*;
4
 import static org.easymock.EasyMock.*;
5
 import se.citerus.dddsample.domain.model.cargo.Cargo;
5
 import se.citerus.dddsample.domain.model.cargo.Cargo;
6
 import se.citerus.dddsample.domain.model.cargo.CargoRepository;
6
 import se.citerus.dddsample.domain.model.cargo.CargoRepository;
7
+import se.citerus.dddsample.domain.model.cargo.RouteSpecification;
7
 import se.citerus.dddsample.domain.model.cargo.TrackingId;
8
 import se.citerus.dddsample.domain.model.cargo.TrackingId;
8
 import static se.citerus.dddsample.domain.model.carrier.SampleVoyages.CM001;
9
 import static se.citerus.dddsample.domain.model.carrier.SampleVoyages.CM001;
9
 import se.citerus.dddsample.domain.model.carrier.Voyage;
10
 import se.citerus.dddsample.domain.model.carrier.Voyage;
37
 
38
 
38
 
39
 
39
     trackingId = new TrackingId("ABC");
40
     trackingId = new TrackingId("ABC");
40
-    cargo = new Cargo(trackingId, TOKYO, HELSINKI);
41
+    RouteSpecification routeSpecification = new RouteSpecification(TOKYO, HELSINKI, new Date());
42
+    cargo = new Cargo(trackingId, routeSpecification);
41
   }
43
   }
42
 
44
 
43
   public void testCreateHandlingEventWithCarrierMovement() throws Exception {
45
   public void testCreateHandlingEventWithCarrierMovement() throws Exception {

+ 8
- 1
dddsample/src/test/java/se/citerus/dddsample/domain/model/handling/HandlingEventTest.java Dosyayı Görüntüle

2
 
2
 
3
 import junit.framework.TestCase;
3
 import junit.framework.TestCase;
4
 import se.citerus.dddsample.domain.model.cargo.Cargo;
4
 import se.citerus.dddsample.domain.model.cargo.Cargo;
5
+import se.citerus.dddsample.domain.model.cargo.RouteSpecification;
5
 import se.citerus.dddsample.domain.model.cargo.TrackingId;
6
 import se.citerus.dddsample.domain.model.cargo.TrackingId;
6
 import se.citerus.dddsample.domain.model.carrier.SampleVoyages;
7
 import se.citerus.dddsample.domain.model.carrier.SampleVoyages;
7
 import static se.citerus.dddsample.domain.model.carrier.SampleVoyages.CM003;
8
 import static se.citerus.dddsample.domain.model.carrier.SampleVoyages.CM003;
13
 import java.util.Date;
14
 import java.util.Date;
14
 
15
 
15
 public class HandlingEventTest extends TestCase {
16
 public class HandlingEventTest extends TestCase {
16
-  private final Cargo cargo = new Cargo(new TrackingId("XYZ"), HONGKONG, NEWYORK);
17
+  private Cargo cargo;
18
+
19
+  protected void setUp() throws Exception {
20
+    TrackingId trackingId = new TrackingId("XYZ");
21
+    RouteSpecification routeSpecification = new RouteSpecification(HONGKONG, NEWYORK, new Date());
22
+    cargo = new Cargo(trackingId, routeSpecification);
23
+  }
17
 
24
 
18
   public void testNewWithCarrierMovement() throws Exception {
25
   public void testNewWithCarrierMovement() throws Exception {
19
 
26
 

+ 11
- 6
dddsample/src/test/java/se/citerus/dddsample/infrastructure/persistence/hibernate/CargoRepositoryTest.java Dosyayı Görüntüle

2
 
2
 
3
 import se.citerus.dddsample.application.util.SampleDataGenerator;
3
 import se.citerus.dddsample.application.util.SampleDataGenerator;
4
 import se.citerus.dddsample.domain.model.cargo.*;
4
 import se.citerus.dddsample.domain.model.cargo.*;
5
-import se.citerus.dddsample.domain.model.carrier.*;
5
+import static se.citerus.dddsample.domain.model.carrier.SampleVoyages.CM004;
6
+import static se.citerus.dddsample.domain.model.carrier.SampleVoyages.HELSINKI_TO_HONGKONG;
7
+import se.citerus.dddsample.domain.model.carrier.Voyage;
8
+import se.citerus.dddsample.domain.model.carrier.VoyageNumber;
9
+import se.citerus.dddsample.domain.model.carrier.VoyageRepository;
6
 import se.citerus.dddsample.domain.model.handling.HandlingEvent;
10
 import se.citerus.dddsample.domain.model.handling.HandlingEvent;
7
 import static se.citerus.dddsample.domain.model.handling.HandlingEvent.Type.LOAD;
11
 import static se.citerus.dddsample.domain.model.handling.HandlingEvent.Type.LOAD;
8
 import static se.citerus.dddsample.domain.model.handling.HandlingEvent.Type.RECEIVE;
12
 import static se.citerus.dddsample.domain.model.handling.HandlingEvent.Type.RECEIVE;
11
 import static se.citerus.dddsample.domain.model.location.SampleLocations.*;
15
 import static se.citerus.dddsample.domain.model.location.SampleLocations.*;
12
 import se.citerus.dddsample.domain.model.location.UnLocode;
16
 import se.citerus.dddsample.domain.model.location.UnLocode;
13
 
17
 
14
-import java.util.*;
18
+import java.util.Arrays;
19
+import java.util.Date;
20
+import java.util.List;
21
+import java.util.Map;
15
 
22
 
16
 public class CargoRepositoryTest extends AbstractRepositoryTest {
23
 public class CargoRepositoryTest extends AbstractRepositoryTest {
17
 
24
 
46
 
53
 
47
     HandlingEvent secondEvent = events.get(1);
54
     HandlingEvent secondEvent = events.get(1);
48
 
55
 
49
-    Voyage voyage = new Voyage(new VoyageNumber("0303"), new Schedule(new ArrayList<CarrierMovement>()));
50
-
51
-    assertHandlingEvent(cargo,  secondEvent, LOAD, HONGKONG, 150, 110, voyage);
56
+    assertHandlingEvent(cargo, secondEvent, LOAD, HONGKONG, 150, 110, HELSINKI_TO_HONGKONG);
52
 
57
 
53
     List<Leg> legs = cargo.itinerary().legs();
58
     List<Leg> legs = cargo.itinerary().legs();
54
     assertEquals(3, legs.size());
59
     assertEquals(3, legs.size());
116
 
121
 
117
     Location legFrom = locationRepository.find(new UnLocode("FIHEL"));
122
     Location legFrom = locationRepository.find(new UnLocode("FIHEL"));
118
     Location legTo = locationRepository.find(new UnLocode("DEHAM"));
123
     Location legTo = locationRepository.find(new UnLocode("DEHAM"));
119
-    Itinerary newItinerary = new Itinerary(Arrays.asList(new Leg(SampleVoyages.CM004, legFrom, legTo, new Date(), new Date())));
124
+    Itinerary newItinerary = new Itinerary(Arrays.asList(new Leg(CM004, legFrom, legTo, new Date(), new Date())));
120
 
125
 
121
     cargo.assignToRoute(newItinerary);
126
     cargo.assignToRoute(newItinerary);
122
 
127
 

+ 2
- 2
dddsample/src/test/java/se/citerus/dddsample/infrastructure/routing/ExternalRoutingServiceTest.java Dosyayı Görüntüle

45
 
45
 
46
   public void testCalculatePossibleRoutes() {
46
   public void testCalculatePossibleRoutes() {
47
     TrackingId trackingId = new TrackingId("ABC");
47
     TrackingId trackingId = new TrackingId("ABC");
48
-    Cargo cargo = new Cargo(trackingId, HONGKONG, HELSINKI);
49
-    RouteSpecification routeSpecification = new RouteSpecification(cargo.origin(), cargo.destination(), new Date());
48
+    RouteSpecification routeSpecification = new RouteSpecification(HONGKONG, HELSINKI, new Date());
49
+    Cargo cargo = new Cargo(trackingId, routeSpecification);
50
 
50
 
51
     expect(voyageRepository.find(isA(VoyageNumber.class))).andStubReturn(SampleVoyages.CM002);
51
     expect(voyageRepository.find(isA(VoyageNumber.class))).andStubReturn(SampleVoyages.CM002);
52
     
52
     

+ 0
- 48
dddsample/src/test/java/se/citerus/dddsample/interfaces/handling/HandlinEventServiceEndpointTest.java Dosyayı Görüntüle

1
-package se.citerus.dddsample.interfaces.handling;
2
-
3
-import junit.framework.TestCase;
4
-import static org.easymock.EasyMock.*;
5
-import se.citerus.dddsample.application.HandlingEventRegistrationAttempt;
6
-import se.citerus.dddsample.application.SystemEvents;
7
-
8
-import java.text.SimpleDateFormat;
9
-import java.util.Date;
10
-
11
-public class HandlinEventServiceEndpointTest extends TestCase {
12
-
13
-  private HandlingEventServiceEndpointImpl endpoint;
14
-  private SimpleDateFormat sdf = new SimpleDateFormat(HandlingEventServiceEndpointImpl.ISO_8601_FORMAT);
15
-  private Date date = new Date(100);
16
-  private SystemEvents systemEvents;
17
-
18
-  protected void setUp() throws Exception {
19
-    endpoint = new HandlingEventServiceEndpointImpl();
20
-
21
-    systemEvents = createMock(SystemEvents.class);
22
-    endpoint.setSystemEvents(systemEvents);
23
-  }
24
-
25
-  public void testRegisterValidEvent() throws Exception {
26
-    systemEvents.receivedHandlingEventRegistrationAttempt(isA(HandlingEventRegistrationAttempt.class));
27
-    replay(systemEvents);
28
-
29
-    // Tested call
30
-    endpoint.register(sdf.format(date), "FOO", "CAR_456", "CNHKG", "LOAD");
31
-  }
32
-
33
-  public void testRegisterInalidEvent() throws Exception {
34
-    replay(systemEvents);
35
-
36
-    // Tested call
37
-    try {
38
-      endpoint.register("NOT_A_DATE", "", "", "NOT_A_UN_LOCODE", "NOT_A_TYPE");
39
-      fail("Should not accept invalid ");
40
-    } catch (Exception expected) {
41
-      System.err.println(expected);
42
-    }
43
-  }
44
-
45
-  protected void tearDown() throws Exception {
46
-    verify(systemEvents);
47
-  }
48
-}

+ 4
- 2
dddsample/src/test/java/se/citerus/dddsample/scenario/CargoHandlingScenarioTest.java Dosyayı Görüntüle

49
 
49
 
50
     // Cargo from Hongkong to Stockholm (skipping the booking procedure here)
50
     // Cargo from Hongkong to Stockholm (skipping the booking procedure here)
51
     TrackingId trackingId = generateTrackingId();
51
     TrackingId trackingId = generateTrackingId();
52
+
52
     Location origin = HONGKONG;
53
     Location origin = HONGKONG;
53
     Location destination = STOCKHOLM;
54
     Location destination = STOCKHOLM;
54
-    cargo = new Cargo(trackingId, origin, destination);
55
+    Date arrivalDeadline = inTwoWeeks();
56
+    RouteSpecification routeSpecification = new RouteSpecification(origin, destination, arrivalDeadline);
55
 
57
 
58
+    cargo = new Cargo(trackingId, routeSpecification);
56
 
59
 
57
     assertEquals(RoutingStatus.NOT_ROUTED, cargo.routingStatus());
60
     assertEquals(RoutingStatus.NOT_ROUTED, cargo.routingStatus());
58
 
61
 
59
     // Route cargo
62
     // Route cargo
60
-    RouteSpecification routeSpecification = new RouteSpecification(cargo.origin(), cargo.destination(), inTwoWeeks());
61
     List<Itinerary> itineraries = routingService.fetchRoutesForSpecification(routeSpecification);
63
     List<Itinerary> itineraries = routingService.fetchRoutesForSpecification(routeSpecification);
62
     Itinerary itinerary = selectPreferedItinerary(itineraries);
64
     Itinerary itinerary = selectPreferedItinerary(itineraries);
63
     cargo.assignToRoute(itinerary);
65
     cargo.assignToRoute(itinerary);

+ 4
- 5
dddsample/src/test/java/se/citerus/dddsample/scenario/TrackingScenarioTest.java Dosyayı Görüntüle

1
 package se.citerus.dddsample.scenario;
1
 package se.citerus.dddsample.scenario;
2
 
2
 
3
 import junit.framework.TestCase;
3
 import junit.framework.TestCase;
4
-import se.citerus.dddsample.domain.model.cargo.Cargo;
5
-import se.citerus.dddsample.domain.model.cargo.CargoTestHelper;
6
-import se.citerus.dddsample.domain.model.cargo.Delivery;
7
-import se.citerus.dddsample.domain.model.cargo.TrackingId;
4
+import se.citerus.dddsample.domain.model.cargo.*;
8
 import static se.citerus.dddsample.domain.model.carrier.SampleVoyages.CM001;
5
 import static se.citerus.dddsample.domain.model.carrier.SampleVoyages.CM001;
9
 import static se.citerus.dddsample.domain.model.carrier.SampleVoyages.CM002;
6
 import static se.citerus.dddsample.domain.model.carrier.SampleVoyages.CM002;
10
 import se.citerus.dddsample.domain.model.handling.HandlingEvent;
7
 import se.citerus.dddsample.domain.model.handling.HandlingEvent;
40
   }
37
   }
41
 
38
 
42
   private Cargo populateCargo() throws Exception {
39
   private Cargo populateCargo() throws Exception {
43
-    final Cargo cargo = new Cargo(new TrackingId("XYZ"), STOCKHOLM, MELBOURNE);
40
+    final TrackingId trackingId = new TrackingId("XYZ");
41
+    final RouteSpecification routeSpecification = new RouteSpecification(STOCKHOLM, MELBOURNE, new Date());
42
+    final Cargo cargo = new Cargo(trackingId, routeSpecification);
44
 
43
 
45
     final List<HandlingEvent> handlingEventList = Arrays.asList(
44
     final List<HandlingEvent> handlingEventList = Arrays.asList(
46
       new HandlingEvent(cargo, getDate("2007-12-01"), new Date(), LOAD, STOCKHOLM, CM001),
45
       new HandlingEvent(cargo, getDate("2007-12-01"), new Date(), LOAD, STOCKHOLM, CM001),

+ 3
- 0
dddsample/src/test/resources/handling_events.csv Dosyayı Görüntüle

1
+2008-10-29 12:30:00.000	ZYX	V100	SESTO	LOAD
2
+2008-10-31 04:00:00.000	ZYX	V100	HELSINKI	UNLOAD
3
+2008-10-31 08:12:00.000	ZYX	HELSINKI	UNLOAD