diff --git a/test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue340Tests.cs b/test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue340Tests.cs index f49273f94..5a3dc5a14 100644 --- a/test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue340Tests.cs +++ b/test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue340Tests.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using Xunit; + // ReSharper disable PossibleMultipleEnumeration namespace ExtendedXmlSerializer.Tests.ReportedIssues @@ -14,7 +15,7 @@ public sealed class Issue340Tests [Fact] void Verify() { - var instance = new Subject { Contents = new[] {"Hello", "World!"}.Select(x => x) }; + var instance = new Subject {Contents = new[] {"Hello", "World!"}.Select(x => x)}; new ConfigurationContainer().WithEnumerableSupport() .ForTesting() .Cycle(instance) @@ -45,6 +46,18 @@ void VerifyImmutable() .BeEquivalentTo(instance); } + [Fact] + void VerifyImmutableEnumerable() + { + var instance = new ImmutableSubject(new[] {"Hello", "World!"}.Select(x => x)); + var subject = new ConfigurationContainer().EnableParameterizedContent() + .WithEnumerableSupport() + .ForTesting() + .Cycle(instance); + subject.Should().BeEquivalentTo(instance); + subject.Contents.Should().BeAssignableTo>(); + } + sealed class Subject { public IEnumerable Contents { [UsedImplicitly] get; set; }