@@ -5,16 +5,12 @@ public class Source
55 {
66 public decimal Foo { get ; set ; }
77 }
8-
98 public class Destination
109 {
1110 public Type Foo { get ; set ; }
1211 public string Bar { get ; set ; }
1312 }
14-
15- protected override MapperConfiguration CreateConfiguration ( ) =>
16- new ( cfg => { cfg . CreateMap < Source , Destination > ( ) ; } ) ;
17-
13+ protected override MapperConfiguration CreateConfiguration ( ) => new ( cfg => cfg . CreateMap < Source , Destination > ( ) ) ;
1814 [ Fact ]
1915 public void Should_throw_unmapped_member_and_mismatched_type_exceptions ( )
2016 {
@@ -35,24 +31,19 @@ public void Should_throw_unmapped_member_and_mismatched_type_exceptions()
3531 ) ;
3632 }
3733}
38-
3934public class When_testing_a_dto_with_mismatches_in_multiple_children : AutoMapperSpecBase
4035{
4136 public class Source
4237 {
4338 public Type Foo { get ; set ; }
4439 public Type Bar { get ; set ; }
4540 }
46-
4741 public class Destination
4842 {
4943 public int Foo { get ; set ; }
5044 public int Bar { get ; set ; }
5145 }
52-
53- protected override MapperConfiguration CreateConfiguration ( ) =>
54- new ( cfg => { cfg . CreateMap < Source , Destination > ( ) ; } ) ;
55-
46+ protected override MapperConfiguration CreateConfiguration ( ) => new ( cfg => cfg . CreateMap < Source , Destination > ( ) ) ;
5647 [ Fact ]
5748 public void Should_throw_for_both_mismatched_children ( )
5849 {
@@ -101,7 +92,7 @@ private ComplexType(int someMember)
10192 } ) ;
10293
10394 [ Fact ]
104- public void Should_fail_validation ( ) => new Action ( AssertConfigurationIsValid ) . ShouldThrowException < AutoMapperConfigurationException > ( ex=>
95+ public void Should_fail_validation ( ) => new Action ( AssertConfigurationIsValid ) . ShouldThrowException < AutoMapperConfigurationException > ( ex =>
10596 ex . MemberMap . ToString ( ) . ShouldBe ( "Void .ctor(ComplexType), parameter myComplexMember" ) ) ;
10697}
10798
@@ -204,7 +195,7 @@ public Dest(int value)
204195 public int Value { get ; }
205196 }
206197
207- protected override MapperConfiguration CreateConfiguration ( ) => new ( cfg => cfg . CreateMap < Source , Dest > ( ) . ForCtorParam ( "value" , o=> o . MapFrom ( s=> 4 ) ) ) ;
198+ protected override MapperConfiguration CreateConfiguration ( ) => new ( cfg => cfg . CreateMap < Source , Dest > ( ) . ForCtorParam ( "value" , o => o . MapFrom ( s => 4 ) ) ) ;
208199
209200 [ Fact ]
210201 public void Should_map ( ) => Mapper . Map < Dest > ( new Source ( ) ) . Value . ShouldBe ( 4 ) ;
@@ -384,7 +375,7 @@ class ValueConverter : IValueConverter<int, int>
384375 {
385376 cfg . CreateMap < Source , Destination > ( MemberList . Source )
386377 . ForMember ( d => d . ResolvedDest , o => o . MapFrom < MemberResolver , int > ( "Resolved" ) )
387- . ForMember ( d=> d . TypedResolvedDest , o => o . MapFrom < MemberResolver , int > ( s => s . TypedResolved ) )
378+ . ForMember ( d => d . TypedResolvedDest , o => o . MapFrom < MemberResolver , int > ( s => s . TypedResolved ) )
388379 . ForMember ( d => d . ConvertedDest , o => o . ConvertUsing < ValueConverter , int > ( "Converted" ) )
389380 . ForMember ( d => d . TypedConvertedDest , o => o . ConvertUsing < ValueConverter , int > ( s => s . TypedConverted ) ) ;
390381 } ) ;
@@ -409,8 +400,8 @@ class Destination
409400 {
410401 public string OtherValue { get ; set ; }
411402 }
412- protected override MapperConfiguration CreateConfiguration ( ) => new ( c=> c . CreateMap < Source , Destination > ( MemberList . Source )
413- . ForMember ( d=> d . OtherValue , o=> o . MapFrom ( s=> s . Value ?? "" ) ) ) ;
403+ protected override MapperConfiguration CreateConfiguration ( ) => new ( c => c . CreateMap < Source , Destination > ( MemberList . Source )
404+ . ForMember ( d => d . OtherValue , o => o . MapFrom ( s => s . Value ?? "" ) ) ) ;
414405 [ Fact ]
415406 public void Should_be_ignored ( ) => new Action ( AssertConfigurationIsValid )
416407 . ShouldThrow < AutoMapperConfigurationException > ( ) . Errors [ 0 ] . UnmappedPropertyNames [ 0 ] . ShouldBe ( nameof ( Source . Value ) ) ;
@@ -515,10 +506,10 @@ public class OtherDest
515506 protected override void Because_of ( )
516507 {
517508 try
518- {
519- AssertConfigurationIsValid ( ) ;
509+ {
510+ AssertConfigurationIsValid ( ) ;
520511 }
521- catch ( AutoMapperConfigurationException ex )
512+ catch ( AutoMapperConfigurationException ex )
522513 {
523514 _exception = ex ;
524515 }
@@ -559,7 +550,7 @@ protected override void Because_of()
559550 {
560551 AssertConfigurationIsValid ( ) ;
561552 }
562- catch ( AutoMapperConfigurationException ex )
553+ catch ( AutoMapperConfigurationException ex )
563554 {
564555 _exception = ex ;
565556 }
0 commit comments