예제 #1
0
 public void ShouldInsertUserOnlyOnceAndThenDeleteIt()
 {
     var bl = new UsersBL();
     bl.InsertUser("ohgoahrgorei", "ohgoahrgorei", "*****@*****.**", UserTypes.Student);
     bool actual = bl.InsertUser("ohgoahrgorei", "ohgoahrgorei", "*****@*****.**", UserTypes.Student);
     bl.DeleteUser("ohgoahrgorei", "ohgoahrgorei");
     Assert.IsFalse(actual);
     Assert.IsFalse(bl.ValidateUser("ohgoahrgorei", "ohgoahrgorei", UserTypes.Student));
 }
예제 #2
0
 public void ShouldValidateUser()
 {
     var bl = new UsersBL();
     bl.InsertUser("ohgoahrgorei", "ohgoahrgorei", "*****@*****.**", UserTypes.Student);
     Assert.IsTrue(bl.ValidateUser("ohgoahrgorei", "ohgoahrgorei", UserTypes.Student));
     Assert.IsFalse(bl.ValidateUser("ohgoahrgorei", "ohgoahrgorei111", UserTypes.Student));
     bl.DeleteUser("ohgoahrgorei", "ohgoahrgorei");
     Assert.IsFalse(bl.ValidateUser("ohgoahrgorei", "ohgoahrgorei", UserTypes.Student));
 }