diff --git a/core/src/test/kotlin/fr/sncf/osrd/pathfinding/PathfindingTest.kt b/core/src/test/kotlin/fr/sncf/osrd/pathfinding/PathfindingTest.kt index 10177707da0..eb61c84a340 100644 --- a/core/src/test/kotlin/fr/sncf/osrd/pathfinding/PathfindingTest.kt +++ b/core/src/test/kotlin/fr/sncf/osrd/pathfinding/PathfindingTest.kt @@ -239,7 +239,7 @@ class PathfindingTest : ApiTest() { .satisfies({ exception -> AssertionsForClassTypes.assertThat((exception as OSRDError?)!!.osrdErrorType) .isEqualTo(ErrorType.PathfindingGenericError) - AssertionsForClassTypes.assertThat(exception.context).isEqualTo(HashMap()) + AssertionsForClassTypes.assertThat((exception as OSRDError?)!!.context).isEqualTo(HashMap()) }) } @@ -266,7 +266,7 @@ class PathfindingTest : ApiTest() { .satisfies({ exception -> AssertionsForClassTypes.assertThat((exception as OSRDError?)!!.osrdErrorType) .isEqualTo(ErrorType.UnknownTrackSection) - AssertionsForClassTypes.assertThat(exception.context) + AssertionsForClassTypes.assertThat((exception as OSRDError?)!!.context) .isEqualTo(mapOf(Pair("track_section_id", "this_track_does_not_exist"))) }) } @@ -297,7 +297,7 @@ class PathfindingTest : ApiTest() { .satisfies({ exception -> AssertionsForClassTypes.assertThat((exception as OSRDError?)!!.osrdErrorType) .isEqualTo(ErrorType.PathfindingGaugeError) - AssertionsForClassTypes.assertThat(exception.context) + AssertionsForClassTypes.assertThat((exception as OSRDError?)!!.context) .isEqualTo(mapOf()) }) @@ -412,7 +412,7 @@ class PathfindingTest : ApiTest() { .satisfies({ exception -> AssertionsForClassTypes.assertThat((exception as OSRDError?)!!.osrdErrorType) .isEqualTo(ErrorType.PathfindingElectrificationError) - AssertionsForClassTypes.assertThat(exception.context) + AssertionsForClassTypes.assertThat((exception as OSRDError?)!!.context) .isEqualTo(mapOf()) }) }