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

test VehicleFleetManagers

This commit is contained in:
oblonski 2014-01-15 21:18:00 -05:00
parent d41ad158cd
commit 937702e136
3 changed files with 22 additions and 2 deletions

View file

@ -27,7 +27,6 @@ public class FiniteFleetManagerFactory implements VehicleFleetManagerFactory{
private Collection<Vehicle> vehicles;
/**
* Constucts the factory.
*
@ -40,9 +39,14 @@ public class FiniteFleetManagerFactory implements VehicleFleetManagerFactory{
/**
* Creates the finite fleetmanager.
*
* @return VehicleFleetManager
* @throws IllegalStateManager if vehicles == null or vehicles.isEmpty()
*/
@Override
public VehicleFleetManager createFleetManager() {
if(vehicles == null) throw new IllegalStateException("vehicles is null. this must not be.");
if(vehicles.isEmpty()) throw new IllegalStateException("vehicle-collection is empty. this must not be");
return new VehicleFleetManagerImpl(vehicles);
}