Skip to content

Commit ea49c46

Browse files
committed
NullToExistingDestination
1 parent 5e71e3e commit ea49c46

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/UnitTests/NullBehavior.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
namespace AutoMapper.UnitTests.NullBehavior;
2+
public class NullToExistingDestination : AutoMapperSpecBase
3+
{
4+
protected override MapperConfiguration CreateConfiguration() => new(c => c.CreateMap<string, string>().DisableCtorValidation());
5+
[Fact]
6+
public void Should_return_the_destination()
7+
{
8+
var destination = "42";
9+
Mapper.Map(default(string), destination).ShouldBeSameAs(destination);
10+
}
11+
}
212
public class NullToExistingValue : AutoMapperSpecBase
313
{
414
private record Person

0 commit comments

Comments
 (0)