|
|
@@ -68,7 +68,7 @@ public class CargoTest extends TestCase {
|
|
68
|
68
|
private Cargo populateCargoReceivedStockholm() throws Exception {
|
|
69
|
69
|
final Cargo cargo = new Cargo(new TrackingId("XYZ"), new Location("SESTO"), new Location("AUMEL"));
|
|
70
|
70
|
|
|
71
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-01"), new Date(), HandlingEvent.Type.RECEIVE, null));
|
|
|
71
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-01"), new Date(), HandlingEvent.Type.RECEIVE, new Location("SESTO")));
|
|
72
|
72
|
|
|
73
|
73
|
return cargo;
|
|
74
|
74
|
}
|
|
|
@@ -76,7 +76,7 @@ public class CargoTest extends TestCase {
|
|
76
|
76
|
private Cargo populateCargoClaimedMelbourne() throws Exception {
|
|
77
|
77
|
final Cargo cargo = populateCargoOffMelbourne();
|
|
78
|
78
|
|
|
79
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-09"), new Date(), HandlingEvent.Type.CLAIM, null));
|
|
|
79
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-09"), new Date(), HandlingEvent.Type.CLAIM, new Location("AUMEL")));
|
|
80
|
80
|
|
|
81
|
81
|
return cargo;
|
|
82
|
82
|
}
|
|
|
@@ -88,14 +88,14 @@ public class CargoTest extends TestCase {
|
|
88
|
88
|
final CarrierMovement stockholmToHamburg = new CarrierMovement(
|
|
89
|
89
|
new CarrierId("CAR_001"), new Location("SESTO"), new Location("DEHAM"));
|
|
90
|
90
|
|
|
91
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-01"), new Date(), HandlingEvent.Type.LOAD, stockholmToHamburg));
|
|
92
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-02"), new Date(), HandlingEvent.Type.UNLOAD, stockholmToHamburg));
|
|
|
91
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-01"), new Date(), HandlingEvent.Type.LOAD, new Location("SESTO"), stockholmToHamburg));
|
|
|
92
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-02"), new Date(), HandlingEvent.Type.UNLOAD, new Location("DEHAM"), stockholmToHamburg));
|
|
93
|
93
|
|
|
94
|
94
|
final CarrierMovement hamburgToHongKong = new CarrierMovement(
|
|
95
|
95
|
new CarrierId("CAR_001"), new Location("DEHAM"), new Location("CNHGK"));
|
|
96
|
96
|
|
|
97
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-03"), new Date(), HandlingEvent.Type.LOAD, hamburgToHongKong));
|
|
98
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-04"), new Date(), HandlingEvent.Type.UNLOAD, hamburgToHongKong));
|
|
|
97
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-03"), new Date(), HandlingEvent.Type.LOAD, new Location("DEHAM"), hamburgToHongKong));
|
|
|
98
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-04"), new Date(), HandlingEvent.Type.UNLOAD, new Location("CNHGK"), hamburgToHongKong));
|
|
99
|
99
|
|
|
100
|
100
|
return cargo;
|
|
101
|
101
|
}
|
|
|
@@ -106,13 +106,13 @@ public class CargoTest extends TestCase {
|
|
106
|
106
|
final CarrierMovement stockholmToHamburg = new CarrierMovement(
|
|
107
|
107
|
new CarrierId("CAR_001"), new Location("SESTO"), new Location("DEHAM"));
|
|
108
|
108
|
|
|
109
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-01"), new Date(), HandlingEvent.Type.LOAD, stockholmToHamburg));
|
|
110
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-02"), new Date(), HandlingEvent.Type.UNLOAD, stockholmToHamburg));
|
|
|
109
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-01"), new Date(), HandlingEvent.Type.LOAD, new Location("SESTO"), stockholmToHamburg));
|
|
|
110
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-02"), new Date(), HandlingEvent.Type.UNLOAD, new Location("DEHAM"), stockholmToHamburg));
|
|
111
|
111
|
|
|
112
|
112
|
final CarrierMovement hamburgToHongKong = new CarrierMovement(
|
|
113
|
113
|
new CarrierId("CAR_001"), new Location("DEHAM"), new Location("CNHGK"));
|
|
114
|
114
|
|
|
115
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-03"), new Date(), HandlingEvent.Type.LOAD, hamburgToHongKong));
|
|
|
115
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-03"), new Date(), HandlingEvent.Type.LOAD, new Location("DEHAM"), hamburgToHongKong));
|
|
116
|
116
|
|
|
117
|
117
|
return cargo;
|
|
118
|
118
|
}
|
|
|
@@ -123,20 +123,20 @@ public class CargoTest extends TestCase {
|
|
123
|
123
|
final CarrierMovement stockholmToHamburg = new CarrierMovement(
|
|
124
|
124
|
new CarrierId("CAR_001"), new Location("SESTO"), new Location("DEHAM"));
|
|
125
|
125
|
|
|
126
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-01"), new Date(), HandlingEvent.Type.LOAD, stockholmToHamburg));
|
|
127
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-02"), new Date(), HandlingEvent.Type.UNLOAD, stockholmToHamburg));
|
|
|
126
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-01"), new Date(), HandlingEvent.Type.LOAD, new Location("SESTO"), stockholmToHamburg));
|
|
|
127
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-02"), new Date(), HandlingEvent.Type.UNLOAD, new Location("DEHAM"), stockholmToHamburg));
|
|
128
|
128
|
|
|
129
|
129
|
final CarrierMovement hamburgToHongKong = new CarrierMovement(
|
|
130
|
130
|
new CarrierId("CAR_001"), new Location("DEHAM"), new Location("CNHGK"));
|
|
131
|
131
|
|
|
132
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-03"), new Date(), HandlingEvent.Type.LOAD, hamburgToHongKong));
|
|
133
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-04"), new Date(), HandlingEvent.Type.UNLOAD, hamburgToHongKong));
|
|
|
132
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-03"), new Date(), HandlingEvent.Type.LOAD, new Location("DEHAM"), hamburgToHongKong));
|
|
|
133
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-04"), new Date(), HandlingEvent.Type.UNLOAD, new Location("CNHGK"), hamburgToHongKong));
|
|
134
|
134
|
|
|
135
|
135
|
final CarrierMovement hongKongToMelbourne = new CarrierMovement(
|
|
136
|
136
|
new CarrierId("CAR_001"), new Location("CNHGK"), new Location("AUMEL"));
|
|
137
|
137
|
|
|
138
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-05"), new Date(), HandlingEvent.Type.LOAD, hongKongToMelbourne));
|
|
139
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-07"), new Date(), HandlingEvent.Type.UNLOAD, hongKongToMelbourne));
|
|
|
138
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-05"), new Date(), HandlingEvent.Type.LOAD, new Location("CNHGK"), hongKongToMelbourne));
|
|
|
139
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-07"), new Date(), HandlingEvent.Type.UNLOAD, new Location("AUMEL"), hongKongToMelbourne));
|
|
140
|
140
|
|
|
141
|
141
|
return cargo;
|
|
142
|
142
|
}
|
|
|
@@ -147,19 +147,19 @@ public class CargoTest extends TestCase {
|
|
147
|
147
|
final CarrierMovement stockholmToHamburg = new CarrierMovement(
|
|
148
|
148
|
new CarrierId("CAR_001"), new Location("SESTO"), new Location("DEHAM"));
|
|
149
|
149
|
|
|
150
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-01"), new Date(), HandlingEvent.Type.LOAD, stockholmToHamburg));
|
|
151
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-02"), new Date(), HandlingEvent.Type.UNLOAD, stockholmToHamburg));
|
|
|
150
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-01"), new Date(), HandlingEvent.Type.LOAD, new Location("SESTO"), stockholmToHamburg));
|
|
|
151
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-02"), new Date(), HandlingEvent.Type.UNLOAD, new Location("DEHAM"), stockholmToHamburg));
|
|
152
|
152
|
|
|
153
|
153
|
final CarrierMovement hamburgToHongKong = new CarrierMovement(
|
|
154
|
154
|
new CarrierId("CAR_001"), new Location("DEHAM"), new Location("CNHGK"));
|
|
155
|
155
|
|
|
156
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-03"), new Date(), HandlingEvent.Type.LOAD, hamburgToHongKong));
|
|
157
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-04"), new Date(), HandlingEvent.Type.UNLOAD, hamburgToHongKong));
|
|
|
156
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-03"), new Date(), HandlingEvent.Type.LOAD, new Location("DEHAM"), hamburgToHongKong));
|
|
|
157
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-04"), new Date(), HandlingEvent.Type.UNLOAD, new Location("CNHGK"), hamburgToHongKong));
|
|
158
|
158
|
|
|
159
|
159
|
final CarrierMovement hongKongToMelbourne = new CarrierMovement(
|
|
160
|
160
|
new CarrierId("CAR_001"), new Location("CNHGK"), new Location("AUMEL"));
|
|
161
|
161
|
|
|
162
|
|
- cargo.handle(new HandlingEvent(getDate("2007-12-05"), new Date(), HandlingEvent.Type.LOAD, hongKongToMelbourne));
|
|
|
162
|
+ cargo.handle(new HandlingEvent(getDate("2007-12-05"), new Date(), HandlingEvent.Type.LOAD, new Location("CNHGK"), hongKongToMelbourne));
|
|
163
|
163
|
|
|
164
|
164
|
return cargo;
|
|
165
|
165
|
}
|