public void CreateRepository() { NewRepo(); _user1 = new User {Username = "******", Password = "******"}; Repo.Save(_user1); _user2 = new User {Username = "******", Password = "******"}; Repo.Save(_user2); }
public void TestCreateUser() { var u = new User { Username = Username, Password = Password }; AssertValidEntity(u); }
public void Auth(string username, string password) { var u = _userRepo.FindOne(username); if (Equals(u, null)) throw new ManagerException("Nu exista User!"); if (u.Password == password) { _user = u; } else throw new ManagerException("User incorect!"); }
public void CreateNewUser(string username, string password) { var u = new User {Username = username, Password = password}; _validatorUser.ValidItem(u); _userRepo.Save(u); }
private void AssertValidEntity(User u) { Assert.AreEqual(Username, u.Username); Assert.AreEqual(Password, u.Password); }
public void FindAll() { var item = new User {Username = "******", Password = "******"}; Repo.Save(item); AssertLengthRepo(3); }