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)); }
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)); }