|
|
|
|
|
|
50
|
// HandlingActivity.Load(cargo, RECEIVE, SHANGHAI, toDate("2009-05-03"))
|
50
|
// HandlingActivity.Load(cargo, RECEIVE, SHANGHAI, toDate("2009-05-03"))
|
|
51
|
//Happy path
|
51
|
//Happy path
|
|
52
|
HandlingActivity receiveShanghai = new HandlingActivity(RECEIVE, SHANGHAI);
|
52
|
HandlingActivity receiveShanghai = new HandlingActivity(RECEIVE, SHANGHAI);
|
|
53
|
- assertTrue(itinerary.isExpected(receiveShanghai));
|
|
|
|
|
|
53
|
+ assertTrue(itinerary.wasExpecting(receiveShanghai));
|
|
54
|
|
54
|
|
|
55
|
HandlingActivity loadShanghai = new HandlingActivity(LOAD, SHANGHAI, voyage);
|
55
|
HandlingActivity loadShanghai = new HandlingActivity(LOAD, SHANGHAI, voyage);
|
|
56
|
- assertTrue(itinerary.isExpected(loadShanghai));
|
|
|
|
|
|
56
|
+ assertTrue(itinerary.wasExpecting(loadShanghai));
|
|
57
|
|
57
|
|
|
58
|
HandlingActivity unloadRotterdam = new HandlingActivity(UNLOAD, ROTTERDAM, voyage);
|
58
|
HandlingActivity unloadRotterdam = new HandlingActivity(UNLOAD, ROTTERDAM, voyage);
|
|
59
|
- assertTrue(itinerary.isExpected(unloadRotterdam));
|
|
|
|
|
|
59
|
+ assertTrue(itinerary.wasExpecting(unloadRotterdam));
|
|
60
|
|
60
|
|
|
61
|
HandlingActivity loadRotterdam = new HandlingActivity(LOAD, ROTTERDAM, voyage);
|
61
|
HandlingActivity loadRotterdam = new HandlingActivity(LOAD, ROTTERDAM, voyage);
|
|
62
|
- assertTrue(itinerary.isExpected(loadRotterdam));
|
|
|
|
|
|
62
|
+ assertTrue(itinerary.wasExpecting(loadRotterdam));
|
|
63
|
|
63
|
|
|
64
|
HandlingActivity unloadGothenburg = new HandlingActivity(UNLOAD, GOTHENBURG, voyage);
|
64
|
HandlingActivity unloadGothenburg = new HandlingActivity(UNLOAD, GOTHENBURG, voyage);
|
|
65
|
- assertTrue(itinerary.isExpected(unloadGothenburg));
|
|
|
|
|
|
65
|
+ assertTrue(itinerary.wasExpecting(unloadGothenburg));
|
|
66
|
|
66
|
|
|
67
|
HandlingActivity claimGothenburg = new HandlingActivity(CLAIM, GOTHENBURG);
|
67
|
HandlingActivity claimGothenburg = new HandlingActivity(CLAIM, GOTHENBURG);
|
|
68
|
- assertTrue(itinerary.isExpected(claimGothenburg));
|
|
|
|
|
|
68
|
+ assertTrue(itinerary.wasExpecting(claimGothenburg));
|
|
69
|
|
69
|
|
|
70
|
//TODO Customs event can only be interpreted properly by knowing the destination of the cargo.
|
70
|
//TODO Customs event can only be interpreted properly by knowing the destination of the cargo.
|
|
71
|
// This can be inferred from the Itinerary, but it isn't definitive. So, do we answer based on
|
71
|
// This can be inferred from the Itinerary, but it isn't definitive. So, do we answer based on
|
|
|
|
|
|
|
73
|
// ignore this at itinerary level somehow and leave it purely as a cargo responsibility.
|
73
|
// ignore this at itinerary level somehow and leave it purely as a cargo responsibility.
|
|
74
|
// (See customsClearancePoint tests in CargoTest)
|
74
|
// (See customsClearancePoint tests in CargoTest)
|
|
75
|
// HandlingActivity customsGothenburg = new HandlingActivity(CUSTOMS, GOTHENBURG);
|
75
|
// HandlingActivity customsGothenburg = new HandlingActivity(CUSTOMS, GOTHENBURG);
|
|
76
|
-// assertTrue(itinerary.isExpected(customsGothenburg));
|
|
|
|
|
|
76
|
+// assertTrue(itinerary.wasExpecting(customsGothenburg));
|
|
77
|
|
77
|
|
|
78
|
//Received at the wrong location
|
78
|
//Received at the wrong location
|
|
79
|
HandlingActivity receiveHangzou = new HandlingActivity(RECEIVE, HANGZOU);
|
79
|
HandlingActivity receiveHangzou = new HandlingActivity(RECEIVE, HANGZOU);
|
|
80
|
- assertFalse(itinerary.isExpected(receiveHangzou));
|
|
|
|
|
|
80
|
+ assertFalse(itinerary.wasExpecting(receiveHangzou));
|
|
81
|
|
81
|
|
|
82
|
//Loaded to onto the wrong ship, correct location
|
82
|
//Loaded to onto the wrong ship, correct location
|
|
83
|
HandlingActivity loadRotterdam666 = new HandlingActivity(LOAD, ROTTERDAM, wrongVoyage);
|
83
|
HandlingActivity loadRotterdam666 = new HandlingActivity(LOAD, ROTTERDAM, wrongVoyage);
|
|
84
|
- assertFalse(itinerary.isExpected(loadRotterdam666));
|
|
|
|
|
|
84
|
+ assertFalse(itinerary.wasExpecting(loadRotterdam666));
|
|
85
|
|
85
|
|
|
86
|
//Unloaded from the wrong ship in the wrong location
|
86
|
//Unloaded from the wrong ship in the wrong location
|
|
87
|
HandlingActivity unloadHelsinki = new HandlingActivity(UNLOAD, HELSINKI, wrongVoyage);
|
87
|
HandlingActivity unloadHelsinki = new HandlingActivity(UNLOAD, HELSINKI, wrongVoyage);
|
|
88
|
- assertFalse(itinerary.isExpected(unloadHelsinki));
|
|
|
|
|
|
88
|
+ assertFalse(itinerary.wasExpecting(unloadHelsinki));
|
|
89
|
|
89
|
|
|
90
|
HandlingActivity claimRotterdam = new HandlingActivity(CLAIM, ROTTERDAM);
|
90
|
HandlingActivity claimRotterdam = new HandlingActivity(CLAIM, ROTTERDAM);
|
|
91
|
- assertFalse(itinerary.isExpected(claimRotterdam));
|
|
|
|
|
|
91
|
+ assertFalse(itinerary.wasExpecting(claimRotterdam));
|
|
92
|
}
|
92
|
}
|
|
93
|
|
93
|
|
|
94
|
public void testCreateItinerary() throws Exception {
|
94
|
public void testCreateItinerary() throws Exception {
|