mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#689 Moving test to right spot and making it Locale independent.
This commit is contained in:
parent
a1131e68c9
commit
c105630379
@ -16,9 +16,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime;
|
package org.mapstruct.ap.test.builtin.jodatime;
|
||||||
|
|
||||||
import java.util.TimeZone;
|
|
||||||
import javax.xml.datatype.DatatypeConstants;
|
import javax.xml.datatype.DatatypeConstants;
|
||||||
import javax.xml.datatype.DatatypeFactory;
|
import javax.xml.datatype.DatatypeFactory;
|
||||||
import javax.xml.datatype.XMLGregorianCalendar;
|
import javax.xml.datatype.XMLGregorianCalendar;
|
||||||
@ -30,19 +29,19 @@ import org.joda.time.LocalDateTime;
|
|||||||
import org.joda.time.LocalTime;
|
import org.joda.time.LocalTime;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.DateTimeBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.DateTimeBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.LocalDateBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.LocalDateBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.LocalDateTimeBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.LocalDateTimeBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.LocalTimeBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.LocalTimeBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.XmlGregorianCalendarBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.XmlGregorianCalendarBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.mapper.DateTimeToXmlGregorianCalendar;
|
import org.mapstruct.ap.test.builtin.jodatime.mapper.DateTimeToXmlGregorianCalendar;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.mapper.LocalDateTimeToXmlGregorianCalendar;
|
import org.mapstruct.ap.test.builtin.jodatime.mapper.LocalDateTimeToXmlGregorianCalendar;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.mapper.LocalDateToXmlGregorianCalendar;
|
import org.mapstruct.ap.test.builtin.jodatime.mapper.LocalDateToXmlGregorianCalendar;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.mapper.LocalTimeToXmlGregorianCalendar;
|
import org.mapstruct.ap.test.builtin.jodatime.mapper.LocalTimeToXmlGregorianCalendar;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.mapper.XmlGregorianCalendarToDateTime;
|
import org.mapstruct.ap.test.builtin.jodatime.mapper.XmlGregorianCalendarToDateTime;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.mapper.XmlGregorianCalendarToLocalDate;
|
import org.mapstruct.ap.test.builtin.jodatime.mapper.XmlGregorianCalendarToLocalDate;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.mapper.XmlGregorianCalendarToLocalDateTime;
|
import org.mapstruct.ap.test.builtin.jodatime.mapper.XmlGregorianCalendarToLocalDateTime;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.mapper.XmlGregorianCalendarToLocalTime;
|
import org.mapstruct.ap.test.builtin.jodatime.mapper.XmlGregorianCalendarToLocalTime;
|
||||||
import org.mapstruct.ap.testutil.IssueKey;
|
import org.mapstruct.ap.testutil.IssueKey;
|
||||||
import org.mapstruct.ap.testutil.WithClasses;
|
import org.mapstruct.ap.testutil.WithClasses;
|
||||||
import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner;
|
import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner;
|
||||||
@ -140,7 +139,7 @@ public class JodaTimeTest {
|
|||||||
assertThat( res.getDateTime().getMinuteOfHour() ).isEqualTo( 34 );
|
assertThat( res.getDateTime().getMinuteOfHour() ).isEqualTo( 34 );
|
||||||
assertThat( res.getDateTime().getSecondOfMinute() ).isEqualTo( 45 );
|
assertThat( res.getDateTime().getSecondOfMinute() ).isEqualTo( 45 );
|
||||||
assertThat( res.getDateTime().getMillisOfSecond() ).isEqualTo( 500 );
|
assertThat( res.getDateTime().getMillisOfSecond() ).isEqualTo( 500 );
|
||||||
assertThat( res.getDateTime().getZone().getID() ).isEqualTo( TimeZone.getDefault().getID() );
|
assertThat( res.getDateTime().getZone().getOffset( 0 ) ).isEqualTo( DateTimeZone.getDefault().getOffset( 0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -191,7 +190,7 @@ public class JodaTimeTest {
|
|||||||
assertThat( res.getDateTime().getMinuteOfHour() ).isEqualTo( 34 );
|
assertThat( res.getDateTime().getMinuteOfHour() ).isEqualTo( 34 );
|
||||||
assertThat( res.getDateTime().getSecondOfMinute() ).isEqualTo( 45 );
|
assertThat( res.getDateTime().getSecondOfMinute() ).isEqualTo( 45 );
|
||||||
assertThat( res.getDateTime().getMillisOfSecond() ).isEqualTo( 0 );
|
assertThat( res.getDateTime().getMillisOfSecond() ).isEqualTo( 0 );
|
||||||
assertThat( res.getDateTime().getZone().getID() ).isEqualTo( TimeZone.getDefault().getID() );
|
assertThat( res.getDateTime().getZone().getOffset( 0 ) ).isEqualTo( DateTimeZone.getDefault().getOffset( 0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -240,7 +239,7 @@ public class JodaTimeTest {
|
|||||||
assertThat( res.getDateTime().getMinuteOfHour() ).isEqualTo( 34 );
|
assertThat( res.getDateTime().getMinuteOfHour() ).isEqualTo( 34 );
|
||||||
assertThat( res.getDateTime().getSecondOfMinute() ).isEqualTo( 0 );
|
assertThat( res.getDateTime().getSecondOfMinute() ).isEqualTo( 0 );
|
||||||
assertThat( res.getDateTime().getMillisOfSecond() ).isEqualTo( 0 );
|
assertThat( res.getDateTime().getMillisOfSecond() ).isEqualTo( 0 );
|
||||||
assertThat( res.getDateTime().getZone().getID() ).isEqualTo( TimeZone.getDefault().getID() );
|
assertThat( res.getDateTime().getZone().getOffset( 0 ) ).isEqualTo( DateTimeZone.getDefault().getOffset( 0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
@ -16,7 +16,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.bean;
|
package org.mapstruct.ap.test.builtin.jodatime.bean;
|
||||||
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.bean;
|
package org.mapstruct.ap.test.builtin.jodatime.bean;
|
||||||
|
|
||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.bean;
|
package org.mapstruct.ap.test.builtin.jodatime.bean;
|
||||||
|
|
||||||
import org.joda.time.LocalDateTime;
|
import org.joda.time.LocalDateTime;
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.bean;
|
package org.mapstruct.ap.test.builtin.jodatime.bean;
|
||||||
|
|
||||||
import org.joda.time.LocalTime;
|
import org.joda.time.LocalTime;
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.bean;
|
package org.mapstruct.ap.test.builtin.jodatime.bean;
|
||||||
|
|
||||||
import javax.xml.datatype.XMLGregorianCalendar;
|
import javax.xml.datatype.XMLGregorianCalendar;
|
||||||
|
|
@ -16,12 +16,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.mapper;
|
package org.mapstruct.ap.test.builtin.jodatime.mapper;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.DateTimeBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.DateTimeBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.XmlGregorianCalendarBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.XmlGregorianCalendarBean;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
/**
|
/**
|
@ -16,12 +16,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.mapper;
|
package org.mapstruct.ap.test.builtin.jodatime.mapper;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.LocalDateTimeBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.LocalDateTimeBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.XmlGregorianCalendarBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.XmlGregorianCalendarBean;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
/**
|
/**
|
@ -16,12 +16,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.mapper;
|
package org.mapstruct.ap.test.builtin.jodatime.mapper;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.LocalDateBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.LocalDateBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.XmlGregorianCalendarBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.XmlGregorianCalendarBean;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
/**
|
/**
|
@ -16,12 +16,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.mapper;
|
package org.mapstruct.ap.test.builtin.jodatime.mapper;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.LocalTimeBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.LocalTimeBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.XmlGregorianCalendarBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.XmlGregorianCalendarBean;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
/**
|
/**
|
@ -16,12 +16,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.mapper;
|
package org.mapstruct.ap.test.builtin.jodatime.mapper;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.DateTimeBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.DateTimeBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.XmlGregorianCalendarBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.XmlGregorianCalendarBean;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
/**
|
/**
|
@ -16,12 +16,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.mapper;
|
package org.mapstruct.ap.test.builtin.jodatime.mapper;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.LocalDateBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.LocalDateBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.XmlGregorianCalendarBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.XmlGregorianCalendarBean;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
/**
|
/**
|
@ -16,12 +16,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.mapper;
|
package org.mapstruct.ap.test.builtin.jodatime.mapper;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.LocalDateTimeBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.LocalDateTimeBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.XmlGregorianCalendarBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.XmlGregorianCalendarBean;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
/**
|
/**
|
@ -16,12 +16,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.builtin.bean.jodatime.mapper;
|
package org.mapstruct.ap.test.builtin.jodatime.mapper;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.LocalTimeBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.LocalTimeBean;
|
||||||
import org.mapstruct.ap.test.builtin.bean.jodatime.bean.XmlGregorianCalendarBean;
|
import org.mapstruct.ap.test.builtin.jodatime.bean.XmlGregorianCalendarBean;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
/**
|
/**
|
Loading…
x
Reference in New Issue
Block a user