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

clean up test and mvn stuff

This commit is contained in:
oblonski 2016-08-11 11:13:33 +02:00
parent a96719fde2
commit 1cf21293d2
19 changed files with 16 additions and 210 deletions

View file

@ -1,25 +0,0 @@
/*
* Licensed to GraphHopper GmbH under one or more contributor
* license agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* GraphHopper GmbH licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.graphhopper.jsprit.core;
/**
* Created by schroeder on 17/09/15.
*/
public interface IntegrationTest {
}

View file

@ -17,7 +17,6 @@
*/ */
package com.graphhopper.jsprit.core.algorithm; package com.graphhopper.jsprit.core.algorithm;
import com.graphhopper.jsprit.core.IntegrationTest;
import com.graphhopper.jsprit.core.algorithm.acceptor.GreedyAcceptance; import com.graphhopper.jsprit.core.algorithm.acceptor.GreedyAcceptance;
import com.graphhopper.jsprit.core.algorithm.module.RuinAndRecreateModule; import com.graphhopper.jsprit.core.algorithm.module.RuinAndRecreateModule;
import com.graphhopper.jsprit.core.algorithm.recreate.BestInsertionBuilder; import com.graphhopper.jsprit.core.algorithm.recreate.BestInsertionBuilder;
@ -98,7 +97,6 @@ public class BuildCVRPAlgoFromScratch_IT {
} }
@Test @Test
@Category(IntegrationTest.class)
public void testVRA() { public void testVRA() {
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions(); Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
assertEquals(530.0, Solutions.bestOf(solutions).getCost(), 50.0); assertEquals(530.0, Solutions.bestOf(solutions).getCost(), 50.0);

View file

@ -17,7 +17,6 @@
*/ */
package com.graphhopper.jsprit.core.algorithm; package com.graphhopper.jsprit.core.algorithm;
import com.graphhopper.jsprit.core.IntegrationTest;
import com.graphhopper.jsprit.core.algorithm.box.Jsprit; import com.graphhopper.jsprit.core.algorithm.box.Jsprit;
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem; import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution; import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
@ -34,7 +33,6 @@ import static org.junit.Assert.assertEquals;
public class CVRPwithDeliveries_IT { public class CVRPwithDeliveries_IT {
@Test @Test
@Category(IntegrationTest.class)
public void whenSolvingVRPNC1withDeliveriesWithJsprit_solutionsMustNoBeWorseThan5PercentOfBestKnownSolution() { public void whenSolvingVRPNC1withDeliveriesWithJsprit_solutionsMustNoBeWorseThan5PercentOfBestKnownSolution() {
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
new ChristofidesReader(vrpBuilder).setJobType(JobType.DELIVERY).read(getClass().getResourceAsStream("vrpnc1.txt")); new ChristofidesReader(vrpBuilder).setJobType(JobType.DELIVERY).read(getClass().getResourceAsStream("vrpnc1.txt"));

View file

@ -17,7 +17,6 @@
*/ */
package com.graphhopper.jsprit.core.algorithm; package com.graphhopper.jsprit.core.algorithm;
import com.graphhopper.jsprit.core.IntegrationTest;
import com.graphhopper.jsprit.core.algorithm.box.Jsprit; import com.graphhopper.jsprit.core.algorithm.box.Jsprit;
import com.graphhopper.jsprit.core.analysis.SolutionAnalyser; import com.graphhopper.jsprit.core.analysis.SolutionAnalyser;
import com.graphhopper.jsprit.core.problem.Location; import com.graphhopper.jsprit.core.problem.Location;
@ -45,7 +44,6 @@ public class CVRPwithMatrix_IT {
@Test @Test
@Category(IntegrationTest.class)
public void whenReturnToDepot_itShouldWorkWithMatrix() { public void whenReturnToDepot_itShouldWorkWithMatrix() {
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
new ChristofidesReader(vrpBuilder).setJobType(JobType.DELIVERY).read(getClass().getResourceAsStream("vrpnc1.txt")); new ChristofidesReader(vrpBuilder).setJobType(JobType.DELIVERY).read(getClass().getResourceAsStream("vrpnc1.txt"));
@ -58,7 +56,6 @@ public class CVRPwithMatrix_IT {
} }
@Test @Test
@Category(IntegrationTest.class)
public void whenNotReturnToDepot_itShouldWorkWithMatrix() { public void whenNotReturnToDepot_itShouldWorkWithMatrix() {
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
new ChristofidesReader(vrpBuilder).setJobType(JobType.DELIVERY).read(getClass().getResourceAsStream("vrpnc1.txt")); new ChristofidesReader(vrpBuilder).setJobType(JobType.DELIVERY).read(getClass().getResourceAsStream("vrpnc1.txt"));
@ -74,7 +71,6 @@ public class CVRPwithMatrix_IT {
} }
@Test @Test
@Category(IntegrationTest.class)
public void whenCalcTimeWithSolutionAnalyser_itShouldWork() { public void whenCalcTimeWithSolutionAnalyser_itShouldWork() {
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
new ChristofidesReader(vrpBuilder).setJobType(JobType.DELIVERY).read(getClass().getResourceAsStream("vrpnc1.txt")); new ChristofidesReader(vrpBuilder).setJobType(JobType.DELIVERY).read(getClass().getResourceAsStream("vrpnc1.txt"));

View file

@ -17,7 +17,6 @@
*/ */
package com.graphhopper.jsprit.core.algorithm; package com.graphhopper.jsprit.core.algorithm;
import com.graphhopper.jsprit.core.IntegrationTest;
import com.graphhopper.jsprit.core.algorithm.box.Jsprit; import com.graphhopper.jsprit.core.algorithm.box.Jsprit;
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem; import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution; import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
@ -34,7 +33,6 @@ import static org.junit.Assert.assertEquals;
public class CVRPwithPickups_IT { public class CVRPwithPickups_IT {
@Test @Test
@Category(IntegrationTest.class)
public void whenSolvingVRPNC1WithPickups_solutionsMustNoBeWorseThan5PercentOfBestKnownSolution() { public void whenSolvingVRPNC1WithPickups_solutionsMustNoBeWorseThan5PercentOfBestKnownSolution() {
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
new ChristofidesReader(vrpBuilder).setJobType(JobType.PICKUP).read(getClass().getResourceAsStream("vrpnc1.txt")); new ChristofidesReader(vrpBuilder).setJobType(JobType.PICKUP).read(getClass().getResourceAsStream("vrpnc1.txt"));

View file

@ -29,7 +29,6 @@ import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle; import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl; import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleTypeImpl; import com.graphhopper.jsprit.core.problem.vehicle.VehicleTypeImpl;
import com.graphhopper.jsprit.core.reporting.SolutionPrinter;
import com.graphhopper.jsprit.core.util.ManhattanCosts; import com.graphhopper.jsprit.core.util.ManhattanCosts;
import com.graphhopper.jsprit.core.util.Solutions; import com.graphhopper.jsprit.core.util.Solutions;
import org.junit.Assert; import org.junit.Assert;
@ -92,7 +91,6 @@ public class CapacityConstraint_IT {
vra.setMaxIterations(2000); vra.setMaxIterations(2000);
VehicleRoutingProblemSolution solution = Solutions.bestOf(vra.searchSolutions()); VehicleRoutingProblemSolution solution = Solutions.bestOf(vra.searchSolutions());
SolutionPrinter.print(vrp,solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser sa = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser sa = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
public double getDistance(Location from, Location to, double departureTime, Vehicle vehicle) { public double getDistance(Location from, Location to, double departureTime, Vehicle vehicle) {

View file

@ -25,8 +25,8 @@ import com.graphhopper.jsprit.core.problem.job.Service;
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution; import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute; import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl; import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl;
import com.graphhopper.jsprit.core.reporting.SolutionPrinter;
import com.graphhopper.jsprit.core.util.Solutions; import com.graphhopper.jsprit.core.util.Solutions;
import junit.framework.Assert;
import org.junit.Test; import org.junit.Test;
import java.util.Arrays; import java.util.Arrays;
@ -54,10 +54,13 @@ public class ExternalInitialSolutionIsInValidTest {
vra.addInitialSolution(new VehicleRoutingProblemSolution(Arrays.asList(route1), 20.)); vra.addInitialSolution(new VehicleRoutingProblemSolution(Arrays.asList(route1), 20.));
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions(); try {
vra.searchSolutions();
SolutionPrinter.print(vrp, Solutions.bestOf(solutions), SolutionPrinter.Print.VERBOSE); Assert.assertTrue(true);
}
catch (Exception e){
Assert.assertFalse(true);
}
} }

View file

@ -17,7 +17,6 @@
*/ */
package com.graphhopper.jsprit.core.algorithm; package com.graphhopper.jsprit.core.algorithm;
import com.graphhopper.jsprit.core.IntegrationTest;
import com.graphhopper.jsprit.core.algorithm.box.Jsprit; import com.graphhopper.jsprit.core.algorithm.box.Jsprit;
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem; import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution; import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
@ -33,7 +32,6 @@ import static org.junit.Assert.assertEquals;
public class PickupsAndDeliveries_IT { public class PickupsAndDeliveries_IT {
@Test @Test
@Category(IntegrationTest.class)
public void whenSolvingLR101InstanceOfLiLim_solutionsMustNoBeWorseThan5PercentOfBestKnownSolution() { public void whenSolvingLR101InstanceOfLiLim_solutionsMustNoBeWorseThan5PercentOfBestKnownSolution() {
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
new LiLimReader(vrpBuilder).read(getClass().getResourceAsStream("lr101.txt")); new LiLimReader(vrpBuilder).read(getClass().getResourceAsStream("lr101.txt"));

View file

@ -17,7 +17,6 @@
*/ */
package com.graphhopper.jsprit.core.algorithm; package com.graphhopper.jsprit.core.algorithm;
import com.graphhopper.jsprit.core.IntegrationTest;
import com.graphhopper.jsprit.core.algorithm.box.GreedySchrimpfFactory; import com.graphhopper.jsprit.core.algorithm.box.GreedySchrimpfFactory;
import com.graphhopper.jsprit.core.problem.Location; import com.graphhopper.jsprit.core.problem.Location;
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem; import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
@ -26,7 +25,6 @@ import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolutio
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle; import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl; import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleTypeImpl; import com.graphhopper.jsprit.core.problem.vehicle.VehicleTypeImpl;
import com.graphhopper.jsprit.core.reporting.SolutionPrinter;
import com.graphhopper.jsprit.core.util.Solutions; import com.graphhopper.jsprit.core.util.Solutions;
import com.graphhopper.jsprit.core.util.VehicleRoutingTransportCostsMatrix; import com.graphhopper.jsprit.core.util.VehicleRoutingTransportCostsMatrix;
import org.junit.Test; import org.junit.Test;
@ -44,7 +42,6 @@ import static org.junit.Assert.assertEquals;
public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_IT { public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_IT {
@Test @Test
@Category(IntegrationTest.class)
public void testAlgo() { public void testAlgo() {
@ -90,8 +87,6 @@ public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_IT {
// vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100)); // vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100));
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions(); Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
SolutionPrinter.print(vrp, Solutions.bestOf(solutions), SolutionPrinter.Print.VERBOSE);
assertEquals(2. * 397., Solutions.bestOf(solutions).getCost(), 0.01); assertEquals(2. * 397., Solutions.bestOf(solutions).getCost(), 0.01);
assertEquals(2, Solutions.bestOf(solutions).getRoutes().size()); assertEquals(2, Solutions.bestOf(solutions).getRoutes().size());
} }

View file

@ -16,8 +16,6 @@
* limitations under the License. * limitations under the License.
*/ */
package com.graphhopper.jsprit.core.algorithm; package com.graphhopper.jsprit.core.algorithm;
import com.graphhopper.jsprit.core.IntegrationTest;
import com.graphhopper.jsprit.core.algorithm.box.GreedySchrimpfFactory; import com.graphhopper.jsprit.core.algorithm.box.GreedySchrimpfFactory;
import com.graphhopper.jsprit.core.algorithm.termination.IterationWithoutImprovementTermination; import com.graphhopper.jsprit.core.algorithm.termination.IterationWithoutImprovementTermination;
import com.graphhopper.jsprit.core.problem.Location; import com.graphhopper.jsprit.core.problem.Location;
@ -27,8 +25,6 @@ import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolutio
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle; import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl; import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleTypeImpl; import com.graphhopper.jsprit.core.problem.vehicle.VehicleTypeImpl;
import com.graphhopper.jsprit.core.reporting.SolutionPrinter;
import com.graphhopper.jsprit.core.reporting.SolutionPrinter.Print;
import com.graphhopper.jsprit.core.util.Solutions; import com.graphhopper.jsprit.core.util.Solutions;
import com.graphhopper.jsprit.core.util.VehicleRoutingTransportCostsMatrix; import com.graphhopper.jsprit.core.util.VehicleRoutingTransportCostsMatrix;
import org.junit.Test; import org.junit.Test;
@ -46,7 +42,6 @@ import static org.junit.Assert.assertEquals;
public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_withTimeAndDistanceCosts_IT { public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_withTimeAndDistanceCosts_IT {
@Test @Test
@Category(IntegrationTest.class)
public void testAlgo() { public void testAlgo() {
@ -92,8 +87,6 @@ public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_withTimeAndD
vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100)); vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100));
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions(); Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
SolutionPrinter.print(vrp, Solutions.bestOf(solutions), Print.VERBOSE);
assertEquals(2. * 397. + 397., Solutions.bestOf(solutions).getCost(), 0.01); assertEquals(2. * 397. + 397., Solutions.bestOf(solutions).getCost(), 0.01);
assertEquals(2, Solutions.bestOf(solutions).getRoutes().size()); assertEquals(2, Solutions.bestOf(solutions).getRoutes().size());
} }

View file

@ -17,7 +17,7 @@
*/ */
package com.graphhopper.jsprit.core.algorithm; package com.graphhopper.jsprit.core.algorithm;
import com.graphhopper.jsprit.core.IntegrationTest;
import com.graphhopper.jsprit.core.algorithm.box.Jsprit; import com.graphhopper.jsprit.core.algorithm.box.Jsprit;
import com.graphhopper.jsprit.core.algorithm.box.SchrimpfFactory; import com.graphhopper.jsprit.core.algorithm.box.SchrimpfFactory;
import com.graphhopper.jsprit.core.algorithm.termination.IterationWithoutImprovementTermination; import com.graphhopper.jsprit.core.algorithm.termination.IterationWithoutImprovementTermination;
@ -29,7 +29,7 @@ import com.graphhopper.jsprit.core.problem.job.Service;
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution; import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl; import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleTypeImpl; import com.graphhopper.jsprit.core.problem.vehicle.VehicleTypeImpl;
import com.graphhopper.jsprit.core.reporting.SolutionPrinter;
import com.graphhopper.jsprit.core.util.Solutions; import com.graphhopper.jsprit.core.util.Solutions;
import com.graphhopper.jsprit.core.util.VehicleRoutingTransportCostsMatrix; import com.graphhopper.jsprit.core.util.VehicleRoutingTransportCostsMatrix;
import org.junit.Assert; import org.junit.Assert;
@ -47,7 +47,6 @@ public class RefuseCollection_IT {
@Test @Test
@Category(IntegrationTest.class)
public void whenReadingServices_itShouldCalculateCorrectly() { public void whenReadingServices_itShouldCalculateCorrectly() {
/* /*
@ -85,14 +84,11 @@ public class RefuseCollection_IT {
vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100)); vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100));
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions(); Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
SolutionPrinter.print(vrp, Solutions.bestOf(solutions), SolutionPrinter.Print.VERBOSE);
Assert.assertEquals(397.0, Solutions.bestOf(solutions).getCost(), 40.); Assert.assertEquals(397.0, Solutions.bestOf(solutions).getCost(), 40.);
Assert.assertEquals(2, Solutions.bestOf(solutions).getRoutes().size()); Assert.assertEquals(2, Solutions.bestOf(solutions).getRoutes().size());
} }
@Test @Test
@Category(IntegrationTest.class)
public void whenReadingServices_usingJsprit_itShouldCalculateCorrectly() { public void whenReadingServices_usingJsprit_itShouldCalculateCorrectly() {
/* /*
@ -130,14 +126,11 @@ public class RefuseCollection_IT {
vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100)); vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100));
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions(); Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
SolutionPrinter.print(vrp, Solutions.bestOf(solutions), SolutionPrinter.Print.VERBOSE);
Assert.assertEquals(397.0, Solutions.bestOf(solutions).getCost(), 40.); Assert.assertEquals(397.0, Solutions.bestOf(solutions).getCost(), 40.);
Assert.assertEquals(2, Solutions.bestOf(solutions).getRoutes().size()); Assert.assertEquals(2, Solutions.bestOf(solutions).getRoutes().size());
} }
@Test @Test
@Category(IntegrationTest.class)
public void whenReadingPickups_itShouldCalculateCorrectly() { public void whenReadingPickups_itShouldCalculateCorrectly() {
/* /*
@ -175,14 +168,11 @@ public class RefuseCollection_IT {
vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100)); vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100));
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions(); Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
SolutionPrinter.print(vrp, Solutions.bestOf(solutions), SolutionPrinter.Print.VERBOSE);
Assert.assertEquals(397.0, Solutions.bestOf(solutions).getCost(), 40.); Assert.assertEquals(397.0, Solutions.bestOf(solutions).getCost(), 40.);
Assert.assertEquals(2, Solutions.bestOf(solutions).getRoutes().size()); Assert.assertEquals(2, Solutions.bestOf(solutions).getRoutes().size());
} }
@Test @Test
@Category(IntegrationTest.class)
public void whenReadingDeliveries_itShouldCalculateCorrectly() { public void whenReadingDeliveries_itShouldCalculateCorrectly() {
/* /*
@ -220,8 +210,6 @@ public class RefuseCollection_IT {
vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100)); vra.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(100));
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions(); Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
SolutionPrinter.print(vrp, Solutions.bestOf(solutions), SolutionPrinter.Print.VERBOSE);
Assert.assertEquals(397.0, Solutions.bestOf(solutions).getCost(), 40.); Assert.assertEquals(397.0, Solutions.bestOf(solutions).getCost(), 40.);
Assert.assertEquals(2, Solutions.bestOf(solutions).getRoutes().size()); Assert.assertEquals(2, Solutions.bestOf(solutions).getRoutes().size());
} }

View file

@ -18,7 +18,6 @@
package com.graphhopper.jsprit.core.algorithm; package com.graphhopper.jsprit.core.algorithm;
import com.graphhopper.jsprit.core.IntegrationTest;
import com.graphhopper.jsprit.core.algorithm.box.Jsprit; import com.graphhopper.jsprit.core.algorithm.box.Jsprit;
import com.graphhopper.jsprit.core.problem.Skills; import com.graphhopper.jsprit.core.problem.Skills;
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem; import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
@ -45,7 +44,6 @@ import static org.junit.Assert.*;
public class SolomonSkills_IT { public class SolomonSkills_IT {
@Test @Test
@Category(IntegrationTest.class)
public void itShouldMakeCorrectAssignmentAccordingToSkills() { public void itShouldMakeCorrectAssignmentAccordingToSkills() {
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
new SolomonReader(vrpBuilder).read(getClass().getResourceAsStream("C101.txt")); new SolomonReader(vrpBuilder).read(getClass().getResourceAsStream("C101.txt"));

View file

@ -18,7 +18,6 @@
package com.graphhopper.jsprit.core.algorithm; package com.graphhopper.jsprit.core.algorithm;
import com.graphhopper.jsprit.core.IntegrationTest;
import com.graphhopper.jsprit.core.algorithm.box.Jsprit; import com.graphhopper.jsprit.core.algorithm.box.Jsprit;
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem; import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution; import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
@ -36,7 +35,6 @@ import java.util.Collection;
public class Solomon_IT { public class Solomon_IT {
@Test @Test
@Category(IntegrationTest.class)
public void itShouldFindTheBestKnownSolution() { public void itShouldFindTheBestKnownSolution() {
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
new SolomonReader(vrpBuilder).read(getClass().getResourceAsStream("C101.txt")); new SolomonReader(vrpBuilder).read(getClass().getResourceAsStream("C101.txt"));

View file

@ -18,7 +18,7 @@
package com.graphhopper.jsprit.core.algorithm; package com.graphhopper.jsprit.core.algorithm;
import com.graphhopper.jsprit.core.IntegrationTest;
import com.graphhopper.jsprit.core.algorithm.box.Jsprit; import com.graphhopper.jsprit.core.algorithm.box.Jsprit;
import com.graphhopper.jsprit.core.algorithm.state.StateManager; import com.graphhopper.jsprit.core.algorithm.state.StateManager;
import com.graphhopper.jsprit.core.analysis.SolutionAnalyser; import com.graphhopper.jsprit.core.analysis.SolutionAnalyser;
@ -97,7 +97,6 @@ public class VariableDepartureAndWaitingTime_IT {
} }
@Test @Test
@Category(IntegrationTest.class)
public void plainSetupShouldWork() { public void plainSetupShouldWork() {
VehicleImpl v = VehicleImpl.Builder.newInstance("v").setStartLocation(Location.newInstance(0, 0)).build(); VehicleImpl v = VehicleImpl.Builder.newInstance("v").setStartLocation(Location.newInstance(0, 0)).build();
Service s1 = Service.Builder.newInstance("s1").setLocation(Location.newInstance(10, 0)).build(); Service s1 = Service.Builder.newInstance("s1").setLocation(Location.newInstance(10, 0)).build();
@ -114,7 +113,6 @@ public class VariableDepartureAndWaitingTime_IT {
} }
@Test @Test
@Category(IntegrationTest.class)
public void withTimeWindowsShouldWork() { public void withTimeWindowsShouldWork() {
VehicleImpl v = VehicleImpl.Builder.newInstance("v").setStartLocation(Location.newInstance(0, 0)).build(); VehicleImpl v = VehicleImpl.Builder.newInstance("v").setStartLocation(Location.newInstance(0, 0)).build();
Service s1 = Service.Builder.newInstance("s1").setTimeWindow(TimeWindow.newInstance(1010, 1100)).setLocation(Location.newInstance(10, 0)).build(); Service s1 = Service.Builder.newInstance("s1").setTimeWindow(TimeWindow.newInstance(1010, 1100)).setLocation(Location.newInstance(10, 0)).build();

View file

@ -39,7 +39,6 @@ import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
import com.graphhopper.jsprit.core.problem.solution.route.activity.ActivityVisitor; import com.graphhopper.jsprit.core.problem.solution.route.activity.ActivityVisitor;
import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity; import com.graphhopper.jsprit.core.problem.solution.route.activity.TourActivity;
import com.graphhopper.jsprit.core.problem.vehicle.*; import com.graphhopper.jsprit.core.problem.vehicle.*;
import com.graphhopper.jsprit.core.reporting.SolutionPrinter;
import com.graphhopper.jsprit.core.util.Coordinate; import com.graphhopper.jsprit.core.util.Coordinate;
import com.graphhopper.jsprit.core.util.Solutions; import com.graphhopper.jsprit.core.util.Solutions;
import junit.framework.Assert; import junit.framework.Assert;
@ -241,7 +240,6 @@ public class RegretInsertionTest {
.buildAlgorithm(); .buildAlgorithm();
VehicleRoutingProblemSolution solution = Solutions.bestOf(vra.searchSolutions()); VehicleRoutingProblemSolution solution = Solutions.bestOf(vra.searchSolutions());
SolutionPrinter.print(vrp,solution, SolutionPrinter.Print.VERBOSE);
for(VehicleRoute route : solution.getRoutes()){ for(VehicleRoute route : solution.getRoutes()){
if(route.getTourActivities().servesJob(s1)){ if(route.getTourActivities().servesJob(s1)){
if(!route.getTourActivities().servesJob(s2)){ if(!route.getTourActivities().servesJob(s2)){
@ -283,7 +281,6 @@ public class RegretInsertionTest {
.buildAlgorithm(); .buildAlgorithm();
VehicleRoutingProblemSolution solution = Solutions.bestOf(vra.searchSolutions()); VehicleRoutingProblemSolution solution = Solutions.bestOf(vra.searchSolutions());
SolutionPrinter.print(vrp,solution, SolutionPrinter.Print.VERBOSE);
for(VehicleRoute route : solution.getRoutes()){ for(VehicleRoute route : solution.getRoutes()){
if(route.getTourActivities().servesJob(s1)){ if(route.getTourActivities().servesJob(s1)){
if(!route.getTourActivities().servesJob(s2)){ if(!route.getTourActivities().servesJob(s2)){

View file

@ -35,7 +35,6 @@ import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl; import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleType; import com.graphhopper.jsprit.core.problem.vehicle.VehicleType;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleTypeImpl; import com.graphhopper.jsprit.core.problem.vehicle.VehicleTypeImpl;
import com.graphhopper.jsprit.core.reporting.SolutionPrinter;
import com.graphhopper.jsprit.core.util.Coordinate; import com.graphhopper.jsprit.core.util.Coordinate;
import com.graphhopper.jsprit.core.util.ManhattanCosts; import com.graphhopper.jsprit.core.util.ManhattanCosts;
import com.graphhopper.jsprit.core.util.TestUtils; import com.graphhopper.jsprit.core.util.TestUtils;
@ -1322,7 +1321,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void capacityViolationOnRoute_shouldWorkWhenViolated() { public void capacityViolationOnRoute_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1338,7 +1336,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void capacityViolationAtEnd_shouldWorkWhenViolated() { public void capacityViolationAtEnd_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1402,7 +1399,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void capacityViolationAfterAct1_shouldWorkWhenViolated() { public void capacityViolationAfterAct1_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1418,7 +1414,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void capacityViolationAfterAct2_shouldWorkWhenViolated() { public void capacityViolationAfterAct2_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1434,7 +1429,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void capacityViolationAfterAct3_shouldWorkWhenViolated() { public void capacityViolationAfterAct3_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1450,7 +1444,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void capacityViolationAfterAct4_shouldWorkWhenViolated() { public void capacityViolationAfterAct4_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1466,7 +1459,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void capacityViolationAfterAct5_shouldWorkWhenViolated() { public void capacityViolationAfterAct5_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1482,7 +1474,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void capacityViolationAfterAct6_shouldWorkWhenViolated() { public void capacityViolationAfterAct6_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1498,7 +1489,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void capacityViolationAfterAct7_shouldWorkWhenViolated() { public void capacityViolationAfterAct7_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1514,7 +1504,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void capacityViolationAfterAct8_shouldWorkWhenViolated() { public void capacityViolationAfterAct8_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1530,7 +1519,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void capacityViolationAfterEnd_shouldWorkWhenViolated() { public void capacityViolationAfterEnd_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1639,7 +1627,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void timeWindowViolation_shouldWorkWhenViolated() { public void timeWindowViolation_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1655,7 +1642,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void timeWindowViolationAtStart_shouldWorkWhenViolated() { public void timeWindowViolationAtStart_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1671,7 +1657,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void timeWindowViolationAtAct1_shouldWorkWhenViolated() { public void timeWindowViolationAtAct1_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1687,7 +1672,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void timeWindowViolationAtAct2_shouldWorkWhenViolated() { public void timeWindowViolationAtAct2_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1703,7 +1687,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void timeWindowViolationAtAct3_shouldWorkWhenViolated() { public void timeWindowViolationAtAct3_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1719,7 +1702,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void timeWindowViolationAtAct4_shouldWorkWhenViolated() { public void timeWindowViolationAtAct4_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1735,7 +1717,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void timeWindowViolationAtAct5_shouldWorkWhenViolated() { public void timeWindowViolationAtAct5_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1751,7 +1732,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void timeWindowViolationAtAct6_shouldWorkWhenViolated() { public void timeWindowViolationAtAct6_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1767,7 +1747,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void timeWindowViolationAtAct7_shouldWorkWhenViolated() { public void timeWindowViolationAtAct7_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1783,7 +1762,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void timeWindowViolationAtAct8_shouldWorkWhenViolated() { public void timeWindowViolationAtAct8_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1799,7 +1777,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void timeWindowViolationAtEnd_shouldWorkWhenViolated() { public void timeWindowViolationAtEnd_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1815,8 +1792,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void backhaulViolation_shouldWorkWhenViolated() { public void backhaulViolation_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
public double getDistance(Location from, Location to, double departureTime, Vehicle vehicle) { public double getDistance(Location from, Location to, double departureTime, Vehicle vehicle) {
@ -1831,8 +1806,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void backhaulViolationAtStart_shouldWork() { public void backhaulViolationAtStart_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
public double getDistance(Location from, Location to, double departureTime, Vehicle vehicle) { public double getDistance(Location from, Location to, double departureTime, Vehicle vehicle) {
@ -1848,7 +1821,6 @@ public class SolutionAnalyserTest {
public void backhaulViolationAtAct1_shouldWork() { public void backhaulViolationAtAct1_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1864,7 +1836,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void backhaulViolationAtAct2_shouldWork() { public void backhaulViolationAtAct2_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1880,7 +1851,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void backhaulViolationAtAct3_shouldWork() { public void backhaulViolationAtAct3_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1896,7 +1866,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void backhaulViolationAtAct4_shouldWork() { public void backhaulViolationAtAct4_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1912,7 +1881,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void backhaulViolationAtAct5_shouldWork() { public void backhaulViolationAtAct5_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1928,7 +1896,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void backhaulViolationAtAct6_shouldWork() { public void backhaulViolationAtAct6_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1944,7 +1911,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void backhaulViolationAtAct7_shouldWork() { public void backhaulViolationAtAct7_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1960,7 +1926,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void backhaulViolationAtAct8_shouldWork() { public void backhaulViolationAtAct8_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1976,7 +1941,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void backhaulViolationAtEnd_shouldWork() { public void backhaulViolationAtEnd_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -1992,7 +1956,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void shipmentViolationAtStart_shouldWork() { public void shipmentViolationAtStart_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2008,7 +1971,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void shipmentViolationAtAct1_shouldWork() { public void shipmentViolationAtAct1_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2024,7 +1986,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void shipmentViolationAtAct2_shouldWork() { public void shipmentViolationAtAct2_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2040,7 +2001,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void shipmentViolationAtAct3_shouldWork() { public void shipmentViolationAtAct3_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2056,7 +2016,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void shipmentViolationAtAct4_shouldWork() { public void shipmentViolationAtAct4_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2072,7 +2031,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void shipmentViolationAtAct5_shouldWork() { public void shipmentViolationAtAct5_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2088,7 +2046,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void shipmentViolationAtAct6_shouldWork() { public void shipmentViolationAtAct6_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2104,7 +2061,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void shipmentViolationAtAct7_shouldWork() { public void shipmentViolationAtAct7_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2120,7 +2076,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void shipmentViolationAtAct8_shouldWork() { public void shipmentViolationAtAct8_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2136,7 +2091,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void shipmentViolationAtEnd_shouldWork() { public void shipmentViolationAtEnd_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2152,7 +2106,6 @@ public class SolutionAnalyserTest {
@Test @Test
public void shipmentViolation_shouldWork() { public void shipmentViolation_shouldWork() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2169,10 +2122,8 @@ public class SolutionAnalyserTest {
public void shipmentViolation_shouldWorkWhenViolated() { public void shipmentViolation_shouldWorkWhenViolated() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
VehicleRoute route = solution.getRoutes().iterator().next(); VehicleRoute route = solution.getRoutes().iterator().next();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
TourActivity deliverShipment = route.getActivities().get(2); TourActivity deliverShipment = route.getActivities().get(2);
route.getTourActivities().removeActivity(deliverShipment); route.getTourActivities().removeActivity(deliverShipment);
// SolutionPrinter.print(vrp,solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2189,11 +2140,8 @@ public class SolutionAnalyserTest {
public void shipmentViolationAtActivity_shouldWorkWhenRemovingDelivery() { public void shipmentViolationAtActivity_shouldWorkWhenRemovingDelivery() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
VehicleRoute route = solution.getRoutes().iterator().next(); VehicleRoute route = solution.getRoutes().iterator().next();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
TourActivity deliverShipment = route.getActivities().get(2); TourActivity deliverShipment = route.getActivities().get(2);
route.getTourActivities().removeActivity(deliverShipment); route.getTourActivities().removeActivity(deliverShipment);
// assertFalse(route.getTourActivities().hasActivity(pickupShipment));
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2210,11 +2158,9 @@ public class SolutionAnalyserTest {
public void shipmentViolation_shouldWorkWhenRemovingDelivery() { public void shipmentViolation_shouldWorkWhenRemovingDelivery() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
VehicleRoute route = solution.getRoutes().iterator().next(); VehicleRoute route = solution.getRoutes().iterator().next();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
TourActivity deliverShipment = route.getActivities().get(2); TourActivity deliverShipment = route.getActivities().get(2);
route.getTourActivities().removeActivity(deliverShipment); route.getTourActivities().removeActivity(deliverShipment);
assertFalse(route.getActivities().contains(deliverShipment)); assertFalse(route.getActivities().contains(deliverShipment));
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2231,11 +2177,9 @@ public class SolutionAnalyserTest {
public void shipmentViolationAtActivity_shouldWorkWhenRemovingPickup() { public void shipmentViolationAtActivity_shouldWorkWhenRemovingPickup() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
VehicleRoute route = solution.getRoutes().iterator().next(); VehicleRoute route = solution.getRoutes().iterator().next();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
TourActivity pickupShipment = route.getActivities().get(1); TourActivity pickupShipment = route.getActivities().get(1);
route.getTourActivities().removeActivity(pickupShipment); route.getTourActivities().removeActivity(pickupShipment);
assertFalse(route.getActivities().contains(pickupShipment)); assertFalse(route.getActivities().contains(pickupShipment));
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2252,11 +2196,9 @@ public class SolutionAnalyserTest {
public void shipmentViolationOnRoute_shouldWorkWhenRemovingPickup() { public void shipmentViolationOnRoute_shouldWorkWhenRemovingPickup() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
VehicleRoute route = solution.getRoutes().iterator().next(); VehicleRoute route = solution.getRoutes().iterator().next();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
TourActivity pickupShipment = route.getActivities().get(1); TourActivity pickupShipment = route.getActivities().get(1);
route.getTourActivities().removeActivity(pickupShipment); route.getTourActivities().removeActivity(pickupShipment);
assertFalse(route.getActivities().contains(pickupShipment)); assertFalse(route.getActivities().contains(pickupShipment));
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override
@ -2273,11 +2215,9 @@ public class SolutionAnalyserTest {
public void shipmentViolationOnSolution_shouldWorkWhenRemovingPickup() { public void shipmentViolationOnSolution_shouldWorkWhenRemovingPickup() {
buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore(); buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore();
VehicleRoute route = solution.getRoutes().iterator().next(); VehicleRoute route = solution.getRoutes().iterator().next();
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
TourActivity pickupShipment = route.getActivities().get(1); TourActivity pickupShipment = route.getActivities().get(1);
route.getTourActivities().removeActivity(pickupShipment); route.getTourActivities().removeActivity(pickupShipment);
assertFalse(route.getActivities().contains(pickupShipment)); assertFalse(route.getActivities().contains(pickupShipment));
SolutionPrinter.print(vrp, solution, SolutionPrinter.Print.VERBOSE);
SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() { SolutionAnalyser analyser = new SolutionAnalyser(vrp, solution, new TransportDistance() {
@Override @Override

View file

@ -26,8 +26,8 @@ import java.util.HashSet;
import java.util.Set; import java.util.Set;
import static org.hamcrest.core.Is.is; import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsCollectionContaining.hasItem;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import static org.junit.internal.matchers.IsCollectionContaining.hasItem;
public class ServiceTest { public class ServiceTest {

View file

@ -25,8 +25,8 @@ import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import static org.hamcrest.core.Is.is; import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsCollectionContaining.hasItem;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import static org.junit.internal.matchers.IsCollectionContaining.hasItem;
public class ShipmentTest { public class ShipmentTest {

71
pom.xml
View file

@ -84,7 +84,7 @@
<properties> <properties>
<jdkVersion>1.7</jdkVersion> <jdkVersion>1.7</jdkVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>4.10</junit.version> <junit.version>4.12</junit.version>
<mockito.version>1.9.5</mockito.version> <mockito.version>1.9.5</mockito.version>
<hamcrest.version>1.3</hamcrest.version> <hamcrest.version>1.3</hamcrest.version>
<logger.version>1.7.21</logger.version> <logger.version>1.7.21</logger.version>
@ -110,78 +110,13 @@
</testResource> </testResource>
</testResources> </testResources>
<!--<pluginManagement>-->
<!--<plugins>-->
<!--<plugin>-->
<!--<groupId>org.eclipse.m2e</groupId>-->
<!--<artifactId>lifecycle-mapping</artifactId>-->
<!--<version>1.0.0</version>-->
<!--<configuration>-->
<!--<lifecycleMappingMetadata>-->
<!--<pluginExecutions>-->
<!--<pluginExecution>-->
<!--<pluginExecutionFilter>-->
<!--<groupId>org.apache.maven.plugins</groupId>-->
<!--<artifactId>maven-enforcer-plugin</artifactId>-->
<!--<versionRange>[1.0.0,)</versionRange>-->
<!--<goals>-->
<!--<goal>enforce</goal>-->
<!--</goals>-->
<!--</pluginExecutionFilter>-->
<!--<action>-->
<!--<ignore />-->
<!--</action>-->
<!--</pluginExecution>-->
<!--</pluginExecutions>-->
<!--</lifecycleMappingMetadata>-->
<!--</configuration>-->
<!--</plugin>-->
<!--</plugins>-->
<!--</pluginManagement>-->
<plugins> <plugins>
<!--<plugin>-->
<!--<artifactId>maven-enforcer-plugin</artifactId>-->
<!--<version>1.3.1</version>-->
<!--<executions>-->
<!--<execution>-->
<!--<id>enforce-versions</id>-->
<!--<phase>initialize</phase>-->
<!--<goals>-->
<!--<goal>enforce</goal>-->
<!--</goals>-->
<!--<configuration>-->
<!--<fail>true</fail>-->
<!--<rules>-->
<!--<requireMavenVersion>-->
<!--Some plugin features require a recent Maven runtime to work properly-->
<!--<message>Current version of Maven ${maven.version} required to build the project-->
<!--should be ${project.prerequisites.maven}, or higher!-->
<!--</message>-->
<!--<version>[${project.prerequisites.maven},)</version>-->
<!--</requireMavenVersion>-->
<!--<requireJavaVersion>-->
<!--<message>Current JDK version ${java.version} should be ${jdkVersion}, or higher!-->
<!--</message>-->
<!--<version>${jdkVersion}</version>-->
<!--</requireJavaVersion>-->
<!--</rules>-->
<!--</configuration>-->
<!--</execution>-->
<!--</executions>-->
<!--</plugin>-->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version> <version>3.5.1</version>
<configuration> <configuration>
<!--
<compilerArgument>-Xlint:unchecked</compilerArgument>
<compilerArgument>-Xlint:deprecation</compilerArgument>
-->
<!-- suppress warning about Unsafe functionality -->
<compilerArgument>-XDignore.symbol.file</compilerArgument> <compilerArgument>-XDignore.symbol.file</compilerArgument>
<fork>true</fork> <fork>true</fork>
<source>${jdkVersion}</source> <source>${jdkVersion}</source>
@ -201,7 +136,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId> <artifactId>maven-failsafe-plugin</artifactId>
<version>2.19</version> <version>2.19.1</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>