[BAEL-19420] - Fixed DateUtilsUnitTest

This commit is contained in:
amit2103 2019-11-20 18:03:52 +05:30
parent cbf0e6f6f1
commit b022c54e3f
1 changed files with 4 additions and 6 deletions

View File

@ -2,18 +2,16 @@ package com.baeldung.datetime.sql;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import com.baeldung.datetime.sql.DateUtils;
import java.text.ParseException;
import java.util.Date;
import java.time.LocalDate;
import org.junit.Test;
public class DateUtilsUnitTest {
@Test
public void givenCurrentDate_thenTodayIsReturned() {
assertEquals(DateUtils.getNow(), new Date());
assertEquals(DateUtils.getNow().toLocalDate(), LocalDate.now());
}
@Test(expected = IllegalArgumentException.class)