Examples of CalendarProperty


Examples of org.mapstruct.ap.test.builtin.bean.CalendarProperty

    @Test
    @WithClasses({ CalendarProperty.class, XmlGregorianCalendarProperty.class, CalendarToXmlGregCalMapper.class })
    public void shouldApplyBuiltInOnCalendarToXmlGregCal() throws ParseException, DatatypeConfigurationException {

        CalendarProperty source = new CalendarProperty();
        source.setProp( createCalendar( "02.03.1999" ) );

        XmlGregorianCalendarProperty target = CalendarToXmlGregCalMapper.INSTANCE.map( source );
        assertThat( target ).isNotNull();
        assertThat( target.getProp() ).isNotNull();
        assertThat( target.getProp().toString() ).isEqualTo( "1999-03-02T00:00:00.000+01:00" );
View Full Code Here

Examples of org.mapstruct.ap.test.builtin.bean.CalendarProperty

    public void shouldApplyBuiltInOnXmlGregCalToCalendar() throws ParseException, DatatypeConfigurationException {

        XmlGregorianCalendarProperty source = new XmlGregorianCalendarProperty();
        source.setProp( createXmlCal( 1999, 3, 2, 60 ) );

        CalendarProperty target = XmlGregCalToCalendarMapper.INSTANCE.map( source );
        assertThat( target ).isNotNull();
        assertThat( target.getProp() ).isNotNull();
        assertThat( target.getProp().getTimeInMillis() ).isEqualTo( 920329200000L );

    }
View Full Code Here

Examples of org.mapstruct.ap.test.builtin.bean.CalendarProperty

    @Test
    @WithClasses({ DateProperty.class, CalendarProperty.class, CalendarToDateMapper.class })
    public void shouldApplyBuiltInOnCalendarToDate() throws ParseException, DatatypeConfigurationException {

        CalendarProperty source = new CalendarProperty();
        source.setProp( createCalendar( "02.03.1999" ) );

        DateProperty target = CalendarToDateMapper.INSTANCE.map( source );
        assertThat( target ).isNotNull();
        assertThat( target.getProp() ).isNotNull();
        assertThat( target.getProp()).isEqualTo( createCalendar( "02.03.1999" ).getTime());
View Full Code Here

Examples of org.mapstruct.ap.test.builtin.bean.CalendarProperty

    public void shouldApplyBuiltInOnDateToCalendar() throws ParseException, DatatypeConfigurationException {

        DateProperty source = new DateProperty();
        source.setProp( new SimpleDateFormat( "dd.MM.yyyy" ).parse( "02.03.1999" ) );

        CalendarProperty target = DateToCalendarMapper.INSTANCE.map( source );
        assertThat( target ).isNotNull();
        assertThat( target.getProp() ).isNotNull();
        assertThat( target.getProp()).isEqualTo( createCalendar( "02.03.1999" ));

    }
View Full Code Here

Examples of org.mapstruct.ap.test.builtin.bean.CalendarProperty

    @Test
    @WithClasses({ StringProperty.class, CalendarProperty.class, CalendarToStringMapper.class })
    public void shouldApplyBuiltInOnCalendarToString() throws ParseException, DatatypeConfigurationException {

        CalendarProperty source = new CalendarProperty();
        source.setProp( createCalendar( "02.03.1999" ) );

        StringProperty target = CalendarToStringMapper.INSTANCE.map( source );
        assertThat( target ).isNotNull();
        assertThat( target.getProp() ).isNotNull();
        assertThat( target.getProp()).isEqualTo( "02.03.1999" );
View Full Code Here

Examples of org.mapstruct.ap.test.builtin.bean.CalendarProperty

    public void shouldApplyBuiltInOnStringToCalendar() throws ParseException, DatatypeConfigurationException {

        StringProperty source = new StringProperty();
        source.setProp( "02.03.1999" );

        CalendarProperty target = StringToCalendarMapper.INSTANCE.map( source );
        assertThat( target ).isNotNull();
        assertThat( target.getProp() ).isNotNull();
        assertThat( target.getProp()).isEqualTo( createCalendar( "02.03.1999" ) );

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.