Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added 2nd instance/test.
Browse files Browse the repository at this point in the history
Mike-E-angelo committed Jun 22, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent e188e5c commit 252f4ab
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue407Tests.cs
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ public void Verify()
{
Models = new List<PathogenDto>
{
new Pathogen{ PathogenType = type },
new Pathogen{ PathogenType = type }
}
},
@@ -29,10 +30,14 @@ public void Verify()

var serializer = new ConfigurationContainer().EnableReferences().ForTesting();
var cycled = serializer.Cycle(instance);
cycled[0].To<LookupTable<PathogenDto>>()
.Models.Only()
.PathogenType.Should()
.BeSameAs(cycled[1].To<LookupTable<PathogenTypeDto>>().Models.Only());
var expected = cycled[1].To<LookupTable<PathogenTypeDto>>().Models.Only();

var table = cycled[0].To<LookupTable<PathogenDto>>();
table.Models[0].PathogenType.Should()
.BeSameAs(expected);
table.Models[1].PathogenType.Should()
.BeSameAs(expected);

}

sealed class LookupTable<T>

0 comments on commit 252f4ab

Please sign in to comment.