File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Ace.CSharp.StructuredAutoMapper.Abstractions.Test
sample/Ace.CSharp.StructuredAutoMapper.Sample.Tests Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -47,4 +47,17 @@ public virtual void GivenMapFromLeftToRightWhenSourceIsNotNullThenMapsData()
4747 right . Should ( ) . NotBeNull ( ) . And . BeOfType < TRight > ( ) ;
4848 LeftToRightAssertions ? . Invoke ( left , right ) ;
4949 }
50+
51+ public virtual void GivenMapFromRightToLeftWhenMappingIsNotConfiguredThenThrowsException ( )
52+ {
53+ // Arrange
54+ var left = Left . Invoke ( ) ;
55+
56+ // Act
57+ var right = mapper . Map < TRight > ( left ) ;
58+ var action = ( ) => mapper . Map < TLeft > ( right ) ;
59+
60+ // Assert
61+ action . Should ( ) . Throw < AutoMapperMappingException > ( ) ;
62+ }
5063}
Original file line number Diff line number Diff line change @@ -34,4 +34,10 @@ public sealed override void GivenMapFromLeftToRightWhenSourceIsNullThenHandlesGr
3434 {
3535 base . GivenMapFromLeftToRightWhenSourceIsNullThenHandlesGracefully ( ) ;
3636 }
37+
38+ [ Fact ]
39+ public sealed override void GivenMapFromRightToLeftWhenMappingIsNotConfiguredThenThrowsException ( )
40+ {
41+ base . GivenMapFromRightToLeftWhenMappingIsNotConfiguredThenThrowsException ( ) ;
42+ }
3743}
You can’t perform that action at this time.
0 commit comments