Skip to content

Commit

Permalink
feat: add unit test (for testing sonar)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelDemey committed Dec 2, 2024
1 parent 3d3f989 commit ade1ae3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/test/java/fr/insee/rmes/utils/DateUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@
class DateUtilsTest {

@Test
void givenDate_whenGetDate_thenResponseIsClean() throws RmesException {

void should_return_date_if_good_format() throws RmesException {
String date = DateUtils.getDate("2018-12-17");
assertEquals("2018-12-17", date);
}

@Test
void should_return_date_if_bad_format() throws RmesException {
String date = DateUtils.getDate("12-17");
assertEquals("12-17", date);
}

}

0 comments on commit ade1ae3

Please sign in to comment.