mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
reproduce issue #213
This commit is contained in:
parent
0e80c0ab50
commit
899fd78ad0
1 changed files with 11 additions and 0 deletions
|
|
@ -297,6 +297,17 @@ public class VehicleRoutingProblemTest {
|
|||
return Location.Builder.newInstance().setId(i).build();
|
||||
}
|
||||
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void whenAddingVehiclesWithSameId_itShouldThrowException(){
|
||||
VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
|
||||
VehicleType type = VehicleTypeImpl.Builder.newInstance("type").build();
|
||||
VehicleImpl vehicle1 = VehicleImpl.Builder.newInstance("v").setStartLocation(Location.newInstance("loc")).setType(type).build();
|
||||
VehicleImpl vehicle2 = VehicleImpl.Builder.newInstance("v").setStartLocation(Location.newInstance("loc")).setType(type).build();
|
||||
builder.addVehicle(vehicle1);
|
||||
builder.addVehicle(vehicle2);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenAddingAVehicle_getAddedVehicleTypesShouldReturnItsType() {
|
||||
VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue