File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change 33import org .junit .Test ;
44
55import javax .xml .datatype .DatatypeConfigurationException ;
6+ import javax .xml .datatype .DatatypeConstants ;
67import javax .xml .datatype .DatatypeFactory ;
78import javax .xml .datatype .XMLGregorianCalendar ;
89import java .time .LocalDate ;
@@ -19,6 +20,7 @@ public void fromLocalDateToXMLGregorianCalendar() throws DatatypeConfigurationEx
1920 assertThat (xmlGregorianCalendar .getYear ()).isEqualTo (localDate .getYear ());
2021 assertThat (xmlGregorianCalendar .getMonth ()).isEqualTo (localDate .getMonthValue ());
2122 assertThat (xmlGregorianCalendar .getDay ()).isEqualTo (localDate .getDayOfMonth ());
23+ assertThat (xmlGregorianCalendar .getTimezone ()).isEqualTo (DatatypeConstants .FIELD_UNDEFINED );
2224 }
2325
2426 @ Test
You can’t perform that action at this time.
0 commit comments