mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
Fix method naming
This commit is contained in:
parent
1187e357c1
commit
85d3b310f7
@ -29,7 +29,7 @@ public class FieldsMappingTest {
|
|||||||
source.normalList = Lists.newArrayList( 10, 11, 12 );
|
source.normalList = Lists.newArrayList( 10, 11, 12 );
|
||||||
source.fieldOnlyWithGetter = 20;
|
source.fieldOnlyWithGetter = 20;
|
||||||
|
|
||||||
Target target = SourceTargetMapper.INSTANCE.toSource( source );
|
Target target = SourceTargetMapper.INSTANCE.toTarget( source );
|
||||||
|
|
||||||
assertThat( target ).isNotNull();
|
assertThat( target ).isNotNull();
|
||||||
assertThat( target.finalInt ).isEqualTo( "10" );
|
assertThat( target.finalInt ).isEqualTo( "10" );
|
||||||
|
@ -19,7 +19,7 @@ public interface SourceTargetMapper {
|
|||||||
SourceTargetMapper INSTANCE = Mappers.getMapper( SourceTargetMapper.class );
|
SourceTargetMapper INSTANCE = Mappers.getMapper( SourceTargetMapper.class );
|
||||||
|
|
||||||
@Mapping(target = "fieldWithMethods", source = "fieldOnlyWithGetter")
|
@Mapping(target = "fieldWithMethods", source = "fieldOnlyWithGetter")
|
||||||
Target toSource(Source source);
|
Target toTarget(Source source);
|
||||||
|
|
||||||
@InheritInverseConfiguration
|
@InheritInverseConfiguration
|
||||||
Source toSource(Target target);
|
Source toSource(Target target);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user