diff --git a/test/Pather.CSharp.UnitTests/ResolverTests.cs b/test/Pather.CSharp.UnitTests/ResolverTests.cs index 2cb7904..bb2c0cf 100644 --- a/test/Pather.CSharp.UnitTests/ResolverTests.cs +++ b/test/Pather.CSharp.UnitTests/ResolverTests.cs @@ -112,15 +112,12 @@ public void MultipleArrayIndexResolution_CorrectSetup_Success() public void SelectionResolution_CorrectSetup_Success() { var r = new Resolver(); - var array = new[] - { - new { P1 = "1" }, - new { P1 = "2" } - }; + var array = new[] { 1, 2}; var path = "[]"; var result = r.Resolve(array, path); result.Should().BeOfType(typeof(Selection)); + result.ShouldBeEquivalentTo(new[] { 1, 2 }); } [Fact] @@ -134,9 +131,9 @@ public void SelectionPropertyResolution_CorrectSetup_Success() }; var path = "[].P1"; - var result = r.Resolve(array, path) as Selection; + var result = r.Resolve(array, path) as IEnumerable; result.Should().NotBeNull(); - result.Entries.Should().BeEquivalentTo(new[] { "1", "2" }); + result.Should().BeEquivalentTo(new[] { "1", "2" }); } [Fact] @@ -150,9 +147,9 @@ public void SelectionDictionaryKeyResolution_CorrectSetup_Success() }; var path = "[][Key]"; - var result = r.Resolve(array, path) as Selection; + var result = r.Resolve(array, path) as IEnumerable; result.Should().NotBeNull(); - result.Entries.Should().BeEquivalentTo(new[] { "1", "2" }); + result.Should().BeEquivalentTo(new[] { "1", "2" }); } [Fact] @@ -166,9 +163,9 @@ public void SelectionArrayIndexResolution_CorrectSetup_Success() }; var path = "[][1]"; - var result = r.Resolve(array, path) as Selection; + var result = r.Resolve(array, path) as IEnumerable; result.Should().NotBeNull(); - result.Entries.Should().BeEquivalentTo(new[] { "2", "4" }); + result.Should().BeEquivalentTo(new[] { "2", "4" }); } [Fact] @@ -182,9 +179,9 @@ public void SelectionFlattening_CorrectSetup_Success() }; var path = "[][]"; - var result = r.Resolve(array, path) as Selection; + var result = r.Resolve(array, path) as IEnumerable; result.Should().NotBeNull(); - result.Entries.Should().BeEquivalentTo(new[] { 1, 2, 3 }); + result.Should().BeEquivalentTo(new[] { 1, 2, 3 }); } [Fact]