Skip to content

Commit

Permalink
add not null assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
kt86 committed Jul 16, 2024
1 parent ac78f5b commit f59e4d6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.junit.jupiter.api.extension.RegisterExtension;
import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.TransportMode;
import org.matsim.freight.carriers.*;
import org.matsim.freight.carriers.CarrierCapabilities.FleetSize;
import org.matsim.testcases.MatsimTestUtils;
import org.matsim.vehicles.Vehicle;
Expand Down Expand Up @@ -65,12 +64,15 @@ void test_whenReadingServices_nuOfServicesIsCorrect(){
void test_whenReadingCarrier_itReadsTypeIdsCorrectly(){

CarrierVehicle light = CarriersUtils.getCarrierVehicle(testCarrier, Id.createVehicleId("lightVehicle"));
assert light != null;
assertEquals("light",light.getVehicleTypeId().toString());

CarrierVehicle medium = CarriersUtils.getCarrierVehicle(testCarrier, Id.createVehicleId("mediumVehicle"));
assert medium != null;
assertEquals("medium",medium.getVehicleTypeId().toString());

CarrierVehicle heavy = CarriersUtils.getCarrierVehicle(testCarrier, Id.createVehicleId("heavyVehicle"));
assert heavy != null;
assertEquals("heavy",heavy.getVehicleTypeId().toString());
}

Expand Down

0 comments on commit f59e4d6

Please sign in to comment.