You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
775 B
29 lines
775 B
using adminBlazor.Models;
|
|
|
|
namespace TestUnit
|
|
{
|
|
public class AppUser_UT
|
|
{
|
|
public static IEnumerable<object[]> SimpleAttributes()
|
|
{
|
|
yield return new object[]
|
|
{
|
|
"password",
|
|
new List<String>(),
|
|
"username"
|
|
};
|
|
}
|
|
|
|
[Theory]
|
|
[MemberData(nameof(SimpleAttributes))]
|
|
public void SimpleAttribut_Validation(string password, List<String> roles, string username)
|
|
{
|
|
var appUser = new AppUser { Password = password, Roles = roles, UserName = username };
|
|
|
|
Assert.Equal(password, appUser.Password);
|
|
Assert.Equal(roles, appUser.Roles);
|
|
Assert.Equal(username, appUser.UserName);
|
|
}
|
|
}
|
|
}
|