Skip to content

Commit

Permalink
Added test for #358.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-E-angelo committed Jul 21, 2020
1 parent 7e2d9b4 commit 4661a29
Showing 1 changed file with 47 additions and 0 deletions.
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; }
}
}
}

0 comments on commit 4661a29

Please sign in to comment.