public void LoginModule_DeleteUser_DeleteUser_bool() { LoginComponent.TechnicalService.ILoginDataMapper fdm = new FakeILoginDataMapper(); LoginComponent.Controller.Login l = new LoginComponent.Controller.Login(fdm); l.CreateUser("username10", "123456", "123456"); bool b; string hashedpassword = FakeHelper.HashPassword("123456"); b = l.DeleteUser("username10", hashedpassword); Assert.IsTrue(b); }
public void LoginModule_CreateUser_UserStorged_Void() { bool b = false; LoginComponent.TechnicalService.ILoginDataMapper fdm = new FakeILoginDataMapper(); LoginComponent.Controller.Login l = new LoginComponent.Controller.Login(fdm); l.CreateUser("username6", "123456", "123456"); string hashedpassword = FakeHelper.HashPassword("123456"); foreach (var x in FakeDatabase.user_table) { if (x.username.Equals("username6") && x.hashedPassword.Equals(hashedpassword)) { b = true; } } Assert.IsTrue(b); }