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");
        }
Пример #2
0
 /// <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);
     }
 }
Пример #3
0
        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");
        }
Пример #4
0
 private ActionResult Index(IceCreamFreezer freezer)
 {
     ViewBag.Title           = freezer.Name;
     ViewBag.FreezerContents = freezer.Contents();
     return(View());
 }