using System.Net; using System.Text; using System.Text.Json.Nodes; using Azure.Core; using EI_TestProject; using IRaCIS.Application.Contracts; using IRaCIS.Core.Infrastructure; using IRaCIS.Core.Infrastructure.Extention; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Org.BouncyCastle.Asn1.Crmf; using Org.BouncyCastle.Asn1.Ocsp; using RestSharp; using Xunit; using Xunit.Abstractions; public class UserApiTests : IDisposable { private RestClient _client; public UserApiTests() { // 创建一个 RestClient 对象,并设置基本 URL //client = new RestClient("http://localhost:6100"); _client = RestHelper.InitRestHelper("http://123.56.94.154:8090/api", "Admin", MD5Helper.Md5("WHxckj@2019")); } /// /// 删除系统用户 /// [Fact] public async void Test_DeleteUserById() { var userId = Guid.Parse("98430000-3e2c-0016-225f-08db7612c7ae"); var url = $"/user/deleteUser/{userId}"; //测试删除Api var result = await RestHelper.DeleteRequestAsync>(url); } public void Dispose() { // 在测试结束后释放资源(例如关闭网络连接等) _client?.Dispose(); } }