use of org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto in project mapstruct by mapstruct.
the class SpringDefaultMapperTest method shouldConvertToTarget.
@ProcessorTest
public void shouldConvertToTarget() {
// given
CustomerEntity customerEntity = new CustomerEntity();
customerEntity.setName("Samuel");
customerEntity.setGender(Gender.MALE);
// when
CustomerDto customerDto = customerMapper.asTarget(customerEntity);
// then
assertThat(customerDto).isNotNull();
assertThat(customerDto.getName()).isEqualTo("Samuel");
assertThat(customerDto.getGender()).isEqualTo(GenderDto.M);
}
Aggregations