test/XUnitTestKopSoftWms/LogControllerTest.cs
(完整代码) 1KBusing IServices;
using KopSoftWms.Controllers;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using System;
using Xunit;
namespace XUnitTestKopSoftWms
{
public class LogControllerTest : BaseControllerTest
{
private readonly SqlSugarClient _client;
private readonly ISys_logServices _LogServices;
private LogController controller;
public LogControllerTest()
{
_client = ServiceProvider.GetRequiredService<SqlSugarClient>();
_LogServices = ServiceProvider.GetRequiredService<ISys_logServices>();
controller = new LogController(_client, _LogServices);
}
private new IServiceProvider ServiceProvider => GetServices();
[Fact]
public void TestIndex()
{
var sd = serviceDescriptors.GetEnumerator();
Assert.NotNull(controller.Index());
}
[Fact]
public void TestList()
{
Assert.NotNull(controller.List(GetBootstrap));
}
[Fact]
public void TestDelete()
{
long[] arr = { 12, 34 };
Assert.NotNull(controller.Delete(arr));
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。