@Test void planning_vehicle() { long vehicleId = 2; String name = "not used"; int capacity = 7; Vehicle domainVehicle = VehicleFactory.createVehicle(vehicleId, name, capacity); PlanningVehicle vehicle = fromDomain(domainVehicle); assertThat(vehicle.getId()).isEqualTo(vehicleId); assertThat(vehicle.getCapacity()).isEqualTo(capacity); }
public static PlanningVehicle fromDomain(Vehicle domainVehicle) { return vehicle(domainVehicle.id(), domainVehicle.capacity()); }
PlanningVehicleFactory { public static PlanningVehicle fromDomain(Vehicle domainVehicle) { return vehicle(domainVehicle.id(), domainVehicle.capacity()); } }
PlanningVehicleFactory { public static PlanningVehicle fromDomain(Vehicle domainVehicle) { return vehicle(domainVehicle.id(), domainVehicle.capacity()); } private  PlanningVehicleFactory(); }
PlanningVehicleFactory { public static PlanningVehicle fromDomain(Vehicle domainVehicle) { return vehicle(domainVehicle.id(), domainVehicle.capacity()); } private  PlanningVehicleFactory(); static PlanningVehicle fromDomain(Vehicle domainVehicle); static PlanningVehicle testVehicle(long id); static PlanningVehicle testVehicle(long id, int capacity); }
PlanningVehicleFactory { public static PlanningVehicle fromDomain(Vehicle domainVehicle) { return vehicle(domainVehicle.id(), domainVehicle.capacity()); } private  PlanningVehicleFactory(); static PlanningVehicle fromDomain(Vehicle domainVehicle); static PlanningVehicle testVehicle(long id); static PlanningVehicle testVehicle(long id, int capacity);  }