Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
  • Loading branch information
colinepiloquet committed Feb 17, 2023
1 parent 263d21b commit 7735cc1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,27 @@ void testNoConfig() {

@Test
void testConstructorStartTimeAsssertion() {
AssertionError e = assertThrows(IllegalStateException.class, () -> new DynamicSimulationParameters(-1, 0));
IllegalStateException e = assertThrows(IllegalStateException.class, () -> new DynamicSimulationParameters(-1, 0));
assertTrue(e.getMessage().contains("Start time should be zero or positive"));
}

@Test
void testConstructorStopTimeAsssertion() {
AssertionError e = assertThrows(IllegalStateException.class, () -> new DynamicSimulationParameters(0, 0));
IllegalStateException e = assertThrows(IllegalStateException.class, () -> new DynamicSimulationParameters(0, 0));
assertTrue(e.getMessage().contains("Stop time should be greater than start time"));
}

@Test
void testStartTimeAsssertion() {
DynamicSimulationParameters parameters = new DynamicSimulationParameters();
AssertionError e = assertThrows(IllegalStateException.class, () -> parameters.setStartTime(-1));
IllegalStateException e = assertThrows(IllegalStateException.class, () -> parameters.setStartTime(-1));
assertTrue(e.getMessage().contains("Start time should be zero or positive"));
}

@Test
void testStopTimeAsssertion() {
DynamicSimulationParameters parameters = new DynamicSimulationParameters();
AssertionError e = assertThrows(IllegalStateException.class, () -> parameters.setStopTime(0));
IllegalStateException e = assertThrows(IllegalStateException.class, () -> parameters.setStopTime(0));
assertTrue(e.getMessage().contains("Stop time should be greater than start time"));
}

Expand Down

0 comments on commit 7735cc1

Please sign in to comment.