public void AddToFreezerApprovalTest() { var freezer = new IceCreamFreezer(); freezer.AddIceCream(new IceCreamProduct { Name = "Tastey" }); freezer.AddIceCream(new IceCreamProduct { Name = "Lite" }); Approvals.VerifyAll("Freezer Contents Test:", freezer.Contents(), "Ice Cream"); }
/// <summary> /// Resets the contents of the List Box form the model. /// </summary> public void ResetListBox() { iceCreamListBox.Items.Clear(); foreach (var item in _freezer.Contents()) { iceCreamListBox.Items.Add(item); } }
private ActionResult Index(IceCreamFreezer freezer) { ViewBag.Title = freezer.Name; ViewBag.FreezerContents = freezer.Contents(); return(View()); }