Skip to content

Commit

Permalink
Demonstration of EnableReferences (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-E-angelo authored Nov 3, 2021
1 parent 39751a9 commit 08876f4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace ExtendedXmlSerializer.Tests.ReportedIssues
{
public sealed class Issued434Tests_Extended
public sealed class Issue434Tests_Extended
{
[Fact]
public void Verify()
Expand Down
35 changes: 35 additions & 0 deletions test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue563Tests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using ExtendedXmlSerializer.Configuration;
using ExtendedXmlSerializer.Tests.ReportedIssues.Support;
using FluentAssertions;
using System.Collections.Generic;
using Xunit;

namespace ExtendedXmlSerializer.Tests.ReportedIssues;

public sealed class Issue563Tests
{
[Fact]
public void Verify()
{
var subject = new ConfigurationContainer().EnableReferences().Create().ForTesting();
var instance = new Subject();
subject.Cycle(instance).Should().BeEquivalentTo(instance);
}

sealed class Subject
{
public List<byte[]> ParentKey { get; set; } = new ();
public byte[] Id { get; set; }

public List<byte[]> Key
{
get
{
List<byte[]> result = new(ParentKey);
result.Add(Id);
return result;
}
}

}
}

0 comments on commit 08876f4

Please sign in to comment.