Skip to content

Commit

Permalink
process review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick-4488 committed Jan 8, 2025
1 parent cb6f222 commit d164c2a
Showing 1 changed file with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.when;

@ExtendWith(MockitoExtension.class)
Expand All @@ -27,55 +28,49 @@ public void setup() {

@Test
void isOverledenWithoutValues() {
boolean expected = false;

boolean result = classUnderTest.isOverleden();

assertEquals(expected, result);
assertFalse(result);
}

@Test
void isOverledenWithEmptyInschrijving() {
boolean expected = false;
classUnderTest.setInschrijving(inschrijving);

boolean result = classUnderTest.isOverleden();

assertEquals(expected, result);
assertFalse(result);
}

@Test
void isOverledenWithInschrijvingHavingDatumOpschortingButNoOpschortReden() {
boolean expected = false;
when(inschrijving.getDatumOpschortingBijhouding()).thenReturn(DATE_FIRST_DAY_2021);
classUnderTest.setInschrijving(inschrijving);

boolean result = classUnderTest.isOverleden();

assertEquals(expected, result);
assertFalse(result);
}

@Test
void isOverledenWithInschrijvingHavingDatumOpschortingAndOpschortRedenNotO() {
boolean expected = false;
when(inschrijving.getDatumOpschortingBijhouding()).thenReturn(DATE_FIRST_DAY_2021);
when(inschrijving.getRedenOpschortingBijhouding()).thenReturn(OPSCHORT_REDEN_EMIGRATION);
classUnderTest.setInschrijving(inschrijving);

boolean result = classUnderTest.isOverleden();

assertEquals(expected, result);
assertFalse(result);
}

@Test
void isOverledenWithInschrijvingHavingDatumOpschortingAndOpschortRedenO() {
boolean expected = true;
when(inschrijving.getDatumOpschortingBijhouding()).thenReturn(DATE_FIRST_DAY_2021);
when(inschrijving.getRedenOpschortingBijhouding()).thenReturn(OPSCHORT_REDEN_OVERLIJDEN);
classUnderTest.setInschrijving(inschrijving);

boolean result = classUnderTest.isOverleden();

assertEquals(expected, result);
assertTrue(result);
}
}

0 comments on commit d164c2a

Please sign in to comment.