Example #1
0
 public AccountController(): base()
 {
     _db = new UsersDB();
     _db.Database.CreateIfNotExists();
     _validator = new PasswordValidator() { MinLenght = 8, Statements = new List<ValidatorStatement>() };
     _validator.Statements.Add(new ValidatorStatement { ExpectedAtLeast = 2, Data = new HashSet<char>("0123456789") });
     _validator.Statements.Add(new ValidatorStatement { ExpectedAtLeast = 2, Data = new HashSet<char>("ABCDEFGHIJKLMNOPQRSTUVWXYZ") });
     _validator.Statements.Add(new ValidatorStatement { ExpectedAtLeast = 2, Data = new HashSet<char>("abcdefghijklmnopqrstuvwxyz") });
 }
Example #2
0
 public void SetUp()
 {
     db = new UsersDB();
     db.Database.CreateIfNotExists();
     db.Users.Create();
 }
Example #3
0
 public void TearDown()
 {
     UsersDB db = new UsersDB();
     db.Database.Delete();
 }