public ActionResult Users() { var repo = new UserRepositoryADO(); var model = repo.GetAll().ToList(); return(View(model)); }
public void CanGetUserList() { var repo = new UserRepositoryADO(); var userList = repo.GetAll().ToList(); Assert.AreEqual(2, userList.Count()); }
public static void CanGetUsers() { UserRepositoryADO repo = new UserRepositoryADO(); var result = repo.GetAll().ToList(); Assert.GreaterOrEqual(result.Count, 1); }
public void CanLoadUsers() { var repo = new UserRepositoryADO(); var users = repo.GetAll(); Assert.AreEqual(2, users.Count); Assert.AreEqual("Wise", users[0].LastName); Assert.AreEqual("Eric", users[0].FirstName); Assert.AreEqual("Admin", users[0].UserRoleName); }
public async Task CanAddUserAsync() { var newUser = new AddUserModel() { FirstName = "Tasty", LastName = "Cake", Email = "*****@*****.**", Role = "sales", Password = "******", ConfirmPassword = "******" }; AdminController admin = new AdminController(); await admin.AddUser(newUser); var repo = new UserRepositoryADO(); var users = repo.GetAll(); Assert.AreEqual(users.Count(), 3); }