|
|
|
@ -28,6 +28,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
|
* Tests for {@link WebConversionService}.
|
|
|
|
|
*
|
|
|
|
|
* @author Brian Clozel
|
|
|
|
|
* @author Madhura Bhave
|
|
|
|
|
*/
|
|
|
|
|
public class WebConversionServiceTests {
|
|
|
|
|
|
|
|
|
@ -44,4 +45,12 @@ public class WebConversionServiceTests {
|
|
|
|
|
.isEqualTo("01*01*2018");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void convertFromStringToDate() {
|
|
|
|
|
WebConversionService conversionService = new WebConversionService("yyyy-MM-dd");
|
|
|
|
|
java.time.LocalDate date = conversionService.convert("2018-01-01",
|
|
|
|
|
java.time.LocalDate.class);
|
|
|
|
|
assertThat(date).isEqualTo(java.time.LocalDate.of(2018, 1, 1));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|