/// <summary> /// This controller action returns a view which shows you all the users. /// </summary> public ActionResult Index(string message) { if (Session["LoggedIn"] == null || Session["LoggedIn"].Equals(false)) { return(RedirectToRoute(new { controller = "Home", action = "Index" })); } var allCustomers = _customerUsersLogic.GetAll(); var mapepdAllCustomees = ModelMapper.MapFromListOfCustomerBLLToCustomerViewModelList(allCustomers); return(View(mapepdAllCustomees)); }
public void GetAllTest() { //Arrange var seedDB = new List <CustomerModelDAL>(); var seed = new CustomerModelDAL { Email = "*****@*****.**", Password = PasswordHelperTool.PasswordSHA256Hasher("password"), FirstName = "First", LastName = "Last" }; seedDB.Add(seed); var controller = new CustomerUsersLogic(new CustomerDALStub(seedDB)); //Act var result = controller.GetAll(); //Assert Assert.IsNotNull(result); //Double check }