BAEL-3674: Remove two more unit tests
This commit is contained in:
parent
1973c49acb
commit
df1944164b
@ -9,12 +9,6 @@ import static org.junit.Assert.assertEquals;
|
|||||||
|
|
||||||
public class DateUtilsUnitTest {
|
public class DateUtilsUnitTest {
|
||||||
|
|
||||||
@Test
|
|
||||||
public void givenTimeMillis_thenDateIsReturned() {
|
|
||||||
Date now = DateUtils.getNow();
|
|
||||||
assertEquals(DateUtils.getDate(now.getTime()), now);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenDateAndPattern_thenDateIsCorrectlyReturned() throws ParseException {
|
public void givenDateAndPattern_thenDateIsCorrectlyReturned() throws ParseException {
|
||||||
long milliseconds = new Date(2020 - 1900, 0, 1).getTime();
|
long milliseconds = new Date(2020 - 1900, 0, 1).getTime();
|
||||||
|
@ -9,11 +9,6 @@ import org.junit.Test;
|
|||||||
|
|
||||||
public class DateUtilsUnitTest {
|
public class DateUtilsUnitTest {
|
||||||
|
|
||||||
@Test
|
|
||||||
public void givenCurrentDate_thenTodayIsReturned() {
|
|
||||||
assertEquals(DateUtils.getNow().toLocalDate(), LocalDate.now());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
public void givenDateAsString_whenPatternIsNotRespected_thenExceptionIsThrown() {
|
public void givenDateAsString_whenPatternIsNotRespected_thenExceptionIsThrown() {
|
||||||
DateUtils.getDate("2020 01 01");
|
DateUtils.getDate("2020 01 01");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user