public void ValidateUser() { UserCtr userCtr = new UserCtr(); User returnUser = userCtr.ValidateUser("Knud", "1234"); Assert.AreEqual(returnUser.Username, "Knud"); Assert.IsTrue(returnUser.Password.Equals(User.HashThisPassword("1234"))); }
public void InsertUserCtrl() { User user = new User("ThureKasperJesperHenrikOle1234", "03AC674216F3E15C761EE1A5E255F067953623C8B388B4459E13F978D7C846F4"); UserCtr userCtr = new UserCtr(); userCtr.InsertUser(user.Username, user.Password); var extractedUser = userCtr.ValidateUser(user.Username, user.Password); Assert.IsTrue(user.Username == extractedUser.Username); }