Skip to content

Commit

Permalink
Access to TestUtils.EPSILION
Browse files Browse the repository at this point in the history
  • Loading branch information
kt86 committed Jul 16, 2024
1 parent 128b9aa commit ac78f5b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,23 +139,24 @@ void test_whenReadingToursOfPlan1_SpritScoreIsCorrect(){
List<CarrierPlan> plans = new ArrayList<>(testCarrier.getPlans());
CarrierPlan plan1 = plans.getFirst();
plan1.getAttributes().getAttribute("jspritScore");
assertEquals(Double.NaN, CarriersUtils.getJspritScore(plan1), testUtils.EPSILON);
assertEquals(Double.NaN, CarriersUtils.getJspritScore(plan1), MatsimTestUtils.EPSILON);
assertEquals(Double.NaN, CarriersUtils.getJspritScore(plan1), MatsimTestUtils.EPSILON);
}

@Test
void test_whenReadingToursOfPlan2_jSpritScoreIsCorrect(){
List<CarrierPlan> plans = new ArrayList<>(testCarrier.getPlans());
CarrierPlan plan2 = plans.get(1);
plan2.getAttributes().getAttribute("jspritScore");
assertEquals(80.0, CarriersUtils.getJspritScore(plan2), testUtils.EPSILON);
assertEquals(80.0, CarriersUtils.getJspritScore(plan2), MatsimTestUtils.EPSILON);
}

@Test
void test_whenReadingToursOfPlan3_jSpritIsCorrect(){
List<CarrierPlan> plans = new ArrayList<>(testCarrier.getPlans());
CarrierPlan plan3 = plans.get(2);
plan3.getAttributes().getAttribute("jspritScore");
assertEquals(105.0, CarriersUtils.getJspritScore(plan3), testUtils.EPSILON);
assertEquals(105.0, CarriersUtils.getJspritScore(plan3), MatsimTestUtils.EPSILON);
}


Expand Down

0 comments on commit ac78f5b

Please sign in to comment.