网站首页 网站源码
website
站点相关全部源代码,隐藏了一些关于服务器的信息
using Dpz.Core.EnumLibrary;

namespace Dpz.Core.ServiceTest;

[TestFixture]
public class AccountServiceTest : Basic
{
    [TestCase("pengqian", "pengqian", "1")]
    public async Task CreateUserAsyncTest(string account, string name, string pwd)
    {
        var service = ServiceProvider.GetService<IAccountService>() ?? throw new Exception("IAccountService is null");

        var exists = await service.IsExists(account);
        Assert.False(exists);
        var id = await service.CreateAccountAsync(account, name, pwd, Permissions.System);

        Assert.AreEqual(id, account);
    }
}
loading