Skip to content

Commit 7cfe8ec

Browse files
committed
Basic test coverage for mapping onto an interface
1 parent 84cf4b2 commit 7cfe8ec

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

AgileMapper.UnitTests/WhenMappingOnToComplexTypes.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,16 @@ public void ShouldHandleATargetWithNoMembers()
8989

9090
result.ShouldBeSameAs(target);
9191
}
92+
93+
[Fact]
94+
public void ShouldMapOnToInterface()
95+
{
96+
var source = new PublicImplementation<string> { Value = "Interface! :o" };
97+
IPublicInterface<string> target = new PublicImplementation<string>();
98+
99+
Mapper.Map(source).OnTo(target);
100+
101+
target.Value.ShouldBe("Interface! :o");
102+
}
92103
}
93104
}

0 commit comments

Comments
 (0)