Package org.mapstruct.ap.test.imports.referenced

Examples of org.mapstruct.ap.test.imports.referenced.Target


    @IssueKey("178")
    public void mapperHasNoUnnecessaryImports() {
        Source source = new Source();
        source.setNotImported( new NotImportedDatatype( 42 ) );

        Target target = SourceTargetMapper.INSTANCE.sourceToTarget( source );

        assertThat( target ).isNotNull();
        assertThat( target.getNotImported() ).isSameAs( source.getNotImported() );

        target = SecondSourceTargetMapper.INSTANCE.sourceToTarget( source );

        assertThat( target ).isNotNull();
        assertThat( target.getNotImported() ).isSameAs( source.getNotImported() );

        generatedSource.forMapper( SourceTargetMapper.class ).containsNoImportFor( NotImportedDatatype.class );
        generatedSource.forMapper( SecondSourceTargetMapper.class ).containsNoImportFor( NotImportedDatatype.class );
    }
View Full Code Here

TOP

Related Classes of org.mapstruct.ap.test.imports.referenced.Target

Copyright © 2018 www.massapicom. 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.