From 9dcbf4b4c2a3e6646137ac5341732c6573dd8217 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 24 Jul 2023 14:25:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EI_TestProject/{EI_APITest.cs => APITest_User.cs} | 6 ++++-- EI_TestProject/UnitTest1.cs | 11 ----------- 2 files changed, 4 insertions(+), 13 deletions(-) rename EI_TestProject/{EI_APITest.cs => APITest_User.cs} (93%) delete mode 100644 EI_TestProject/UnitTest1.cs diff --git a/EI_TestProject/EI_APITest.cs b/EI_TestProject/APITest_User.cs similarity index 93% rename from EI_TestProject/EI_APITest.cs rename to EI_TestProject/APITest_User.cs index 5806c9a5..404d5bbe 100644 --- a/EI_TestProject/EI_APITest.cs +++ b/EI_TestProject/APITest_User.cs @@ -20,6 +20,7 @@ public class UserApiTests : IDisposable private RestClient _client; + public UserApiTests() { // 创建一个 RestClient 对象,并设置基本 URL @@ -61,7 +62,8 @@ public class UserApiTests : IDisposable var result = await RestHelper.Post_JsonBodyRequestAsync>(url,jsonBody); - Assert.True(result.Code == ApiResponseCodeEnum.ApiInputError && result.Code != ApiResponseCodeEnum.ProgramException); + + Assert.True(result.Code != ApiResponseCodeEnum.ApiInputError && result.Code != ApiResponseCodeEnum.ProgramException); } @@ -99,7 +101,7 @@ public class UserApiTests : IDisposable //测试删除Api var result = await RestHelper.DeleteRequestAsync>(url); - Assert.True(result.Code==ApiResponseCodeEnum.ApiInputError && result.Code != ApiResponseCodeEnum.ProgramException); + Assert.True(result.Code != ApiResponseCodeEnum.ApiInputError && result.Code != ApiResponseCodeEnum.ProgramException); } diff --git a/EI_TestProject/UnitTest1.cs b/EI_TestProject/UnitTest1.cs deleted file mode 100644 index ffdcfd55..00000000 --- a/EI_TestProject/UnitTest1.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace EI_TestProject -{ - public class UnitTest1 - { - [Fact] - public void Test1() - { - - } - } -} \ No newline at end of file