Skip to content

Commit 126d5ec

Browse files
committed
Update test with more asserts
1 parent 2700e61 commit 126d5ec

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/AutoMapper.Collection.Tests/NotExistingTests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Generic;
2+
using System.Linq;
23
using AutoMapper.EquivalencyExpression;
34
using FluentAssertions;
45
using Xunit;
@@ -12,7 +13,6 @@ public void Should_not_throw_exception_for_nonexisting_types()
1213
{
1314
var configuration = new MapperConfiguration(x =>
1415
{
15-
//x.CreateMissingTypeMaps = false;
1616
x.AddCollectionMappers();
1717
});
1818
IMapper mapper = new Mapper(configuration);
@@ -36,7 +36,10 @@ public void Should_not_throw_exception_for_nonexisting_types()
3636
}
3737
};
3838

39-
mapper.Map<SystemViewModel>(system);
39+
var model = mapper.Map<SystemViewModel>(system);
40+
model.Name.Should().Be(system.Name);
41+
model.Contacts.Single().Name.Should().Be(system.Contacts.Single().Name);
42+
model.Contacts.Single().Emails.Single().Address.Should().Be(system.Contacts.Single().Emails.Single().Address);
4043
}
4144

4245
public class System

0 commit comments

Comments
 (0)