-
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.
- Loading branch information
1 parent
7e2d9b4
commit 4661a29
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue358Tests_Extended.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,47 @@ | ||
using ExtendedXmlSerializer.Configuration; | ||
using ExtendedXmlSerializer.Tests.ReportedIssues.Support; | ||
using FluentAssertions; | ||
using Xunit; | ||
|
||
namespace ExtendedXmlSerializer.Tests.ReportedIssues | ||
{ | ||
public sealed class Issue358Tests_Extended | ||
{ | ||
[Fact] | ||
public void Verify() | ||
{ | ||
var serializer = new ConfigurationContainer().EnableParameterizedContentWithPropertyAssignments() | ||
.EnableReferences() | ||
.Create() | ||
.ForTesting(); | ||
|
||
var length = new length(11); | ||
var instance = new vector(length, length); | ||
|
||
var cycled = serializer.Cycle(instance); | ||
cycled.L1.Should().BeSameAs(cycled.L2); | ||
} | ||
|
||
class length | ||
{ | ||
public length(int value) | ||
{ | ||
Value = value; | ||
} | ||
|
||
public int Value { get; } | ||
} | ||
|
||
class vector | ||
{ | ||
public vector(length l1, length l2) | ||
{ | ||
L1 = l1; | ||
L2 = l2; | ||
} | ||
|
||
public length L1 { get; } | ||
public length L2 { get; } | ||
} | ||
} | ||
} |