Skip to content

Commit 2733a73

Browse files
committed
修改测试逻辑
1 parent 6017fb1 commit 2733a73

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

WebApiClientCore.Test/Attributes/ReturnAttributes/JsonXmlModelResultAttributeTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public async Task EnsureSuccessStatusCodeTest()
6060
var responseContext = new ApiResponseContext(context);
6161

6262
context.HttpContext.RequestMessage.Method = HttpMethod.Post;
63+
context.HttpContext.ResponseMessage.Content = new JsonContent();
6364
context.HttpContext.ResponseMessage.StatusCode = System.Net.HttpStatusCode.InternalServerError;
6465

6566
await Assert.ThrowsAsync<ApiResponseStatusException>(async () =>

0 commit comments

Comments
 (0)