@@ -29,17 +29,20 @@ public void ShouldHaveValidConfiguration()
2929 }
3030
3131 [ Test ]
32- [ TestCase ( typeof ( Document ) , typeof ( DocumentDto ) ) ]
33- [ TestCase ( typeof ( KeyValue ) , typeof ( KeyValueDto ) ) ]
34- [ TestCase ( typeof ( Product ) , typeof ( ProductDto ) ) ]
35- [ TestCase ( typeof ( ProductDto ) , typeof ( Product ) ) ]
36- [ TestCase ( typeof ( KeyValueDto ) , typeof ( KeyValue ) ) ]
37- [ TestCase ( typeof ( DocumentDto ) , typeof ( Document ) ) ]
38- public void ShouldSupportMappingFromSourceToDestination ( Type source , Type destination )
32+ [ TestCase ( typeof ( Document ) , typeof ( DocumentDto ) , true ) ]
33+ [ TestCase ( typeof ( KeyValue ) , typeof ( KeyValueDto ) , true ) ]
34+ [ TestCase ( typeof ( Product ) , typeof ( ProductDto ) , true ) ]
35+
36+ public void ShouldSupportMappingFromSourceToDestination ( Type source , Type destination , bool inverseMap = false )
3937 {
4038 var instance = GetInstanceOf ( source ) ;
4139
4240 _mapper . Map ( instance , source , destination ) ;
41+
42+ if ( inverseMap )
43+ {
44+ ShouldSupportMappingFromSourceToDestination ( destination , source , false ) ;
45+ }
4346 }
4447
4548 private object GetInstanceOf ( Type type )
0 commit comments