From 0f8e58a8f3fe2519d5c2d1a024f9644602eee0b2 Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Sat, 18 Jan 2025 19:53:47 -0600 Subject: [PATCH] Fixed more unit tests Signed-off-by: Whit Waldo --- .../Description/InterfaceDescriptionTests.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/Dapr.Actors.Test/Description/InterfaceDescriptionTests.cs b/test/Dapr.Actors.Test/Description/InterfaceDescriptionTests.cs index 3e264b37..83f4de01 100644 --- a/test/Dapr.Actors.Test/Description/InterfaceDescriptionTests.cs +++ b/test/Dapr.Actors.Test/Description/InterfaceDescriptionTests.cs @@ -12,6 +12,7 @@ // ------------------------------------------------------------------------ using System; +using System.Linq; using System.Threading.Tasks; using Shouldly; using Xunit; @@ -94,9 +95,7 @@ public void InterfaceDescription_CreateGeneratesMethodDescriptions_WhenTypeHasTa // Assert description.Methods.ShouldNotBeNull(); description.Methods.ShouldBeOfType(); - description.Methods.ShouldBeEquivalentTo( - new { Name = "GetInt" } - ); + description.Methods.Select(m => new {m.Name}).ShouldBe(new[] {new {Name = "GetInt"}}); } [Fact] @@ -111,7 +110,7 @@ public void InterfaceDescription_CreateGeneratesMethodDescriptions_WhenTypeHasVo // Assert description.Methods.ShouldNotBeNull(); description.Methods.ShouldBeOfType(); - description.Methods.ShouldBeEquivalentTo(new[] { new { Name = "GetString" }, new { Name = "MethodWithArguments" } }); + description.Methods.Select(m => new {m.Name}).ShouldBe(new[] {new {Name = "GetString"}, new {Name="MethodWithArguments"}}); } [Fact]