1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

reproduced bug #112

This commit is contained in:
oblonski 2014-07-30 10:46:04 +02:00
parent c32507329d
commit fee2a396d9
3 changed files with 33 additions and 17 deletions

View file

@ -19,14 +19,24 @@ import static org.junit.Assert.assertTrue;
public class InitialRoutesTest {
@Test
public void whenReading_thereShouldBeNoDuplicates(){
public void whenReading_jobMapShouldOnlyContainJob2(){
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
new VrpXMLReader(vrpBuilder).read("src/test/resources/simpleProblem_iniRoutes.xml");
VehicleRoutingProblem vrp = vrpBuilder.build();
assertEquals(1,vrp.getJobs().size());
assertTrue(vrp.getJobs().containsKey("2"));
}
@Test
public void whenReading_thereShouldBeOnlyOneActAssociatedToJob2(){
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
new VrpXMLReader(vrpBuilder).read("src/test/resources/simpleProblem_iniRoutes.xml");
VehicleRoutingProblem vrp = vrpBuilder.build();
assertEquals(1,vrp.getActivities(vrp.getJobs().get("2")).size());
}
@Test