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