From e6069a6980ec6d2505e19026d4c84a9588f153dc Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 19 Jan 2020 22:45:43 +0800 Subject: Basically finish refactor of error codes. --- Timeline.Tests/Controllers/PersonalTimelineControllerTest.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Timeline.Tests/Controllers/PersonalTimelineControllerTest.cs') diff --git a/Timeline.Tests/Controllers/PersonalTimelineControllerTest.cs b/Timeline.Tests/Controllers/PersonalTimelineControllerTest.cs index 372ba8a7..bbc8ba75 100644 --- a/Timeline.Tests/Controllers/PersonalTimelineControllerTest.cs +++ b/Timeline.Tests/Controllers/PersonalTimelineControllerTest.cs @@ -142,7 +142,7 @@ namespace Timeline.Tests.Controllers .Which; result.StatusCode.Should().Be(StatusCodes.Status403Forbidden); result.Value.Should().BeAssignableTo() - .Which.Code.Should().Be(ErrorCodes.Http.Timeline.PostListGetForbid); + .Which.Code.Should().Be(ErrorCodes.Common.Forbid); _service.VerifyAll(); } @@ -185,7 +185,7 @@ namespace Timeline.Tests.Controllers })).Result.Should().NotBeNull().And.BeAssignableTo().Which; result.StatusCode.Should().Be(StatusCodes.Status403Forbidden); result.Value.Should().BeAssignableTo() - .Which.Code.Should().Be(ErrorCodes.Http.Timeline.PostOperationCreateForbid); + .Which.Code.Should().Be(ErrorCodes.Common.Forbid); _service.VerifyAll(); } @@ -249,7 +249,7 @@ namespace Timeline.Tests.Controllers })).Should().NotBeNull().And.BeAssignableTo().Which; result.StatusCode.Should().Be(StatusCodes.Status403Forbidden); result.Value.Should().BeAssignableTo() - .Which.Code.Should().Be(ErrorCodes.Http.Timeline.PostOperationDeleteForbid); + .Which.Code.Should().Be(ErrorCodes.Common.Forbid); _service.VerifyAll(); } @@ -266,7 +266,7 @@ namespace Timeline.Tests.Controllers })).Should().NotBeNull().And.BeAssignableTo().Which; result.StatusCode.Should().Be(StatusCodes.Status400BadRequest); result.Value.Should().BeAssignableTo() - .Which.Code.Should().Be(ErrorCodes.Http.Timeline.PostOperationDeleteNotExist); + .Which.Code.Should().Be(ErrorCodes.TimelineController.PostOperationDelete_NotExist); _service.VerifyAll(); } @@ -347,7 +347,7 @@ namespace Timeline.Tests.Controllers }); result.Should().NotBeNull().And.BeAssignableTo() .Which.Value.Should().BeAssignableTo() - .Which.Code.Should().Be(ErrorCodes.Http.Common.InvalidModel); + .Which.Code.Should().Be(ErrorCodes.Common.InvalidModel); _service.VerifyAll(); } @@ -366,7 +366,7 @@ namespace Timeline.Tests.Controllers }); result.Should().NotBeNull().And.BeAssignableTo() .Which.Value.Should().BeAssignableTo() - .Which.Code.Should().Be(ErrorCodes.Http.Timeline.ChangeMemberUserNotExist); + .Which.Code.Should().Be(ErrorCodes.UserCommon.NotExist); _service.VerifyAll(); } -- cgit v1.2.3