-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Issue 613 with ReaderFormatter returning wrong object name
- Loading branch information
1 parent
7c6245a
commit e82c063
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue613Tests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using ExtendedXmlSerializer.Configuration; | ||
using ExtendedXmlSerializer.Tests.ReportedIssues.Support; | ||
using FluentAssertions; | ||
using Xunit; | ||
|
||
namespace ExtendedXmlSerializer.Tests.ReportedIssues | ||
{ | ||
public sealed class Issue613Tests | ||
{ | ||
[Fact] | ||
public void Verify() | ||
{ | ||
var serializer = new ConfigurationContainer().Type<BaseNamespace.Container>() | ||
.AddMigration(EmptyMigration.Default) | ||
.Create() | ||
.ForTesting(); | ||
|
||
var container = new BaseNamespace.Container(); | ||
container.Content.Add(new InheritNamespace.Inherit() { Check = new BaseNamespace.BaseCheck() }); | ||
container.Content.Add(new BaseNamespace.Base() { Check = new InheritNamespace.InheritCheck() }); | ||
serializer.Cycle(container).Should().BeEquivalentTo(container); | ||
} | ||
|
||
[Fact] | ||
public void VerifyWithoutMigration() | ||
{ | ||
var serializer = new ConfigurationContainer().Type<BaseNamespace.Container>() | ||
.Create() | ||
.ForTesting(); | ||
|
||
var container = new BaseNamespace.Container(); | ||
container.Content.Add(new InheritNamespace.Inherit() { Check = new BaseNamespace.BaseCheck() }); | ||
container.Content.Add(new BaseNamespace.Base() { Check = new InheritNamespace.InheritCheck() }); | ||
serializer.Cycle(container).Should().BeEquivalentTo(container); | ||
} | ||
|
||
} | ||
} | ||
|