mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
bugfix 122
This commit is contained in:
parent
2abf5f5c9d
commit
83d2af8f3a
1 changed files with 22 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (C) 2013 Stefan Schroeder
|
* Copyright (C) 2014 Stefan Schroeder
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
|
@ -140,6 +140,23 @@ public class VehicleRoutingProblemTest {
|
||||||
assertEquals(s2,vrp.getJobs().get("s2"));
|
assertEquals(s2,vrp.getJobs().get("s2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void whenServicesAreAdded_vrpShouldContainThemV2(){
|
||||||
|
Service s1 = mock(Service.class);
|
||||||
|
when(s1.getId()).thenReturn("s1");
|
||||||
|
Service s2 = mock(Service.class);
|
||||||
|
when(s2.getId()).thenReturn("s2");
|
||||||
|
|
||||||
|
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
|
||||||
|
vrpBuilder.addJob(s1).addJob(s2);
|
||||||
|
|
||||||
|
VehicleRoutingProblem vrp = vrpBuilder.build();
|
||||||
|
|
||||||
|
assertEquals(2,vrp.getJobs().size());
|
||||||
|
assertEquals(s1,vrp.getJobs().get("s1"));
|
||||||
|
assertEquals(s2,vrp.getJobs().get("s2"));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenPickupsAreAdded_vrpShouldContainThem(){
|
public void whenPickupsAreAdded_vrpShouldContainThem(){
|
||||||
Pickup s1 = mock(Pickup.class);
|
Pickup s1 = mock(Pickup.class);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue