public void should_display_correct_count_when_funds_are_added() { //Arrange //Act manager.AddFund(StockType.Equity, 1, 50); //Assert Assert.AreEqual <int>(1, manager.GetAllMyFunds().Count); }
public ActionResult FundOfProject(FundOfProjectViewModel model, int project_id) { FundManager fm = new FundManager(); UserManager um = new UserManager(); User user = new User(); int sesid = (Session["user"] as User).Id; user = um.Find(x => x.Id == sesid); Project p = pm.Find(x => x.Id == project_id); bool result = fm.AddFund(model, user, p); if (result) { return(RedirectToAction("Index", "Home")); } return(View(model)); }