Package org.mapstruct.ap.test.nestedsourceproperties.source

Examples of org.mapstruct.ap.test.nestedsourceproperties.source.Song


        Artist artist = new Artist();
        artist.setName( "The Beatles" );
        artist.setLabel( label );

        Song song = new Song();
        song.setArtist( artist );
        song.setTitle( "A Hard Day's Night" );

        ChartEntry chartEntry = ArtistToChartEntry.MAPPER.map( song );

        assertThat( chartEntry ).isNotNull();
        assertThat( chartEntry.getArtistName() ).isEqualTo( "The Beatles" );
View Full Code Here


        Artist artist = new Artist();
        artist.setName( "The Beatles" );
        artist.setLabel( label );

        Song song = new Song();
        song.setArtist( artist );
        song.setTitle( "A Hard Day's Night" );

        Chart chart = new Chart();
        chart.setName( "Billboard" );
        chart.setType( "record-sales" );
View Full Code Here

    @Test
    @WithClasses({ ArtistToChartEntryAdder.class, ChartPositions.class, AdderUsageObserver.class })
    public void shouldUseAddAsTargetAccessor() {

        AdderUsageObserver.setUsed( false );
        Song song = new Song();
        song.setPositions( Arrays.asList( 3, 5 ) );

        Chart chart = new Chart();
        chart.setSong( song );

        ChartPositions positions = ArtistToChartEntryAdder.MAPPER.map( chart );
View Full Code Here

    @Test
    @WithClasses({ ArtistToChartEntryGetter.class, ChartPositions.class, AdderUsageObserver.class })
    public void shouldUseGetAsTargetAccessor() {

        AdderUsageObserver.setUsed( false );
        Song song = new Song();
        song.setPositions( Arrays.asList( 3, 5 ) );

        Chart chart = new Chart();
        chart.setSong( song );

        ChartPositions positions = ArtistToChartEntryGetter.MAPPER.map( chart );
View Full Code Here

TOP

Related Classes of org.mapstruct.ap.test.nestedsourceproperties.source.Song

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.