Examples of MapSource


Examples of org.mapstruct.ap.test.builtin.source.MapSource

    @Test
    @WithClasses({ MapSource.class, MapTarget.class, MapSourceTargetMapper.class })
    public void shouldApplyBuiltInOnMap() throws ParseException, DatatypeConfigurationException {

        MapSource source = new MapSource();
        source.setExample( new HashMap<JAXBElement<String>, XMLGregorianCalendar>() );
        source.getExample().put( createJaxb( "TEST" ), createXmlCal( 1999, 3, 2, 60 ) );

        MapTarget target = MapSourceTargetMapper.INSTANCE.sourceToTarget( source );
        assertThat( target ).isNotNull();
        assertThat( target.getExample().get( "TEST" ) ).isEqualTo( "1999-03-02+01:00" );
    }
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.