Package org.mapstruct.ap.test.complex.target

Examples of org.mapstruct.ap.test.complex.target.PersonDto


    }

    @Test
    public void shouldReverseMapReferenceAttribute() {
        //given
        CarDto carDto = new CarDto( "Morris", 2, "1980", new PersonDto( "Bob" ), new ArrayList<PersonDto>() );

        //when
        Car car = CarMapper.INSTANCE.carDtoToCar( carDto );

        //then
View Full Code Here


    }

    @Test
    public void shouldConsiderCustomMappingForReverseMapping() {
        //given
        CarDto carDto = new CarDto( "Morris", 2, "1980", new PersonDto( "Bob" ), new ArrayList<PersonDto>() );

        //when
        Car car = CarMapper.INSTANCE.carDtoToCar( carDto );

        //then
View Full Code Here

    }

    @Test
    public void shouldApplyConverterForReverseMapping() {
        //given
        CarDto carDto = new CarDto( "Morris", 2, "1980", new PersonDto( "Bob" ), new ArrayList<PersonDto>() );

        //when
        Car car = CarMapper.INSTANCE.carDtoToCar( carDto );

        //then
View Full Code Here

    }

    @Test
    public void shouldReverseMapIterable() {
        //given
        CarDto car1 = new CarDto( "Morris", 2, "1980", new PersonDto( "Bob" ), new ArrayList<PersonDto>() );
        CarDto car2 = new CarDto( "Railton", 4, "1934", new PersonDto( "Bill" ), new ArrayList<PersonDto>() );

        //when
        List<Car> cars = CarMapper.INSTANCE.carDtosToCars( new ArrayList<CarDto>( Arrays.asList( car1, car2 ) ) );

        //then
View Full Code Here

        //given
        CarDto carDto = new CarDto(
            "Morris",
            2,
            "1980",
            new PersonDto( "Bob" ),
            new ArrayList<PersonDto>( Arrays.asList( new PersonDto( "Alice" ), new PersonDto( "Bill" ) ) )
        );

        //when
        Car car = CarMapper.INSTANCE.carDtoToCar( carDto );
View Full Code Here

TOP

Related Classes of org.mapstruct.ap.test.complex.target.PersonDto

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.