using NetAdmin.Domain.Dto.Sys;
using NetAdmin.Domain.Dto.Sys.RequestLog;
namespace UnitTests.Sys;
///
/// 请求日志测试
///
[SuppressMessage("Usage", "xUnit1026:Theory methods should use all of their parameters")]
[SuppressMessage("Usage", "xUnit1028:Test method must have valid return type")]
public class RequestLogTests(WebTestApplicationFactory factory, ITestOutputHelper testOutputHelper)
: WebApiTestBase(factory, testOutputHelper), IRequestLogModule
{
///
[InlineData(null)]
[Theory]
public async Task BulkDeleteAsync(BulkReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return 0;
}
///
[InlineData(null)]
[Theory]
public async Task CountAsync(QueryReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return 0;
}
///
[InlineData(null)]
[Theory]
public async Task, int>>> CountByAsync(QueryReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return null;
}
///
[InlineData(null)]
[Theory]
public async Task CreateAsync(CreateRequestLogReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return null;
}
///
[InlineData(null)]
[Theory]
public async Task DeleteAsync(DelReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return 0;
}
///
[InlineData(null)]
[Theory]
public async Task EditAsync(EditRequestLogReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return null;
}
///
[InlineData(null)]
[Theory]
public async Task ExportAsync(QueryReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return null;
}
///
[InlineData(null)]
[Theory]
public async Task GetAsync(QueryRequestLogReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return null;
}
///
[InlineData(null)]
[Theory]
public async Task> GetBarChartAsync(QueryReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return null;
}
///
[InlineData(null)]
[Theory]
public async Task> GetPieChartByApiSummaryAsync(QueryReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return null;
}
///
[InlineData(null)]
[Theory]
public async Task> GetPieChartByHttpStatusCodeAsync(QueryReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return null;
}
///
[InlineData(null)]
[Theory]
public async Task> PagedQueryAsync(PagedQueryReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return null;
}
///
[InlineData(null)]
[Theory]
public async Task> QueryAsync(QueryReq req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return null;
}
}