From e33a029237f96b7c5968ca3b68d562e45a5cf01c Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Sat, 18 Jan 2025 17:10:10 -0600 Subject: [PATCH] Fixed several unit tests Signed-off-by: Whit Waldo --- test/Dapr.AspNetCore.Test/CloudEventsMiddlewareTest.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Dapr.AspNetCore.Test/CloudEventsMiddlewareTest.cs b/test/Dapr.AspNetCore.Test/CloudEventsMiddlewareTest.cs index 5a113396..ae8db689 100644 --- a/test/Dapr.AspNetCore.Test/CloudEventsMiddlewareTest.cs +++ b/test/Dapr.AspNetCore.Test/CloudEventsMiddlewareTest.cs @@ -164,9 +164,9 @@ public async Task InvokeAsync_ForwardsJsonPropertiesAsHeaders(string dataContent ReadBody(httpContext.Request.Body).ShouldBe("{\"name\":\"jimmy\"}"); httpContext.Request.Headers.ShouldContainKey("Cloudevent.type"); - httpContext.Request.Headers["Cloudevent.type"].ShouldBeEquivalentTo("Test.Type"); + httpContext.Request.Headers["Cloudevent.type"].ToString().ShouldBe("Test.Type"); httpContext.Request.Headers.ShouldContainKey("Cloudevent.subject"); - httpContext.Request.Headers["Cloudevent.subject"].ShouldBeEquivalentTo("Test.Subject"); + httpContext.Request.Headers["Cloudevent.subject"].ToString().ShouldBe("Test.Subject"); return Task.CompletedTask; }); @@ -213,7 +213,7 @@ public async Task InvokeAsync_ForwardsIncludedJsonPropertiesAsHeaders(string dat ReadBody(httpContext.Request.Body).ShouldBe("{\"name\":\"jimmy\"}"); httpContext.Request.Headers.ShouldContainKey("Cloudevent.type"); - httpContext.Request.Headers["Cloudevent.type"].ShouldBeEquivalentTo("Test.Type"); + httpContext.Request.Headers["Cloudevent.type"].ToString().ShouldBe("Test.Type"); httpContext.Request.Headers.ShouldNotContainKey("Cloudevent.subject"); return Task.CompletedTask; }); @@ -262,7 +262,7 @@ public async Task InvokeAsync_DoesNotForwardExcludedJsonPropertiesAsHeaders(stri httpContext.Request.Headers.ShouldNotContainKey("Cloudevent.type"); httpContext.Request.Headers.ShouldContainKey("Cloudevent.subject"); - httpContext.Request.Headers["Cloudevent.subject"].ShouldBeEquivalentTo("Test.Subject"); + httpContext.Request.Headers["Cloudevent.subject"].ToString().ShouldBe("Test.Subject"); return Task.CompletedTask; });