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.That(exists, Is.False);
var id = await service.CreateAccountAsync(account, name, pwd, Permissions.System);
Assert.That(id, Is.EqualTo(account));
}
}