public void usercontextFramework_usernameAlreadyUsed_true() { //IUserContext userContext = new UserContext_customDAL("name = mysqlCon2"); IUserContext userContext = new UserContext_framework("name = mysqlCon"); string pas = hashingService.sha1.GetSha1("admin").Substring(0, 20).ToLower(); user user = userContext.getUserByUsernamePassword("admin", pas); bool output = userContext.usernameAlreadyUsed("joshua", user); Assert.IsTrue(output); }
public void usercontextFramework_getuserbyusernamepassword_notNull() { //IUserContext userContext = new UserContext_customDAL("name = mysqlCon2"); IUserContext userContext = new UserContext_framework("name = mysqlCon"); string pas = hashingService.sha1.GetSha1("admin").Substring(0, 20).ToLower(); user user = userContext.getUserByUsernamePassword("admin", pas); Assert.IsNotNull(user); }