예제 #1
0
        public void GetAllVends_ReturnsTheListOfAllVends_VendList()
        {
            string      name1       = "Suzie's Cupcakes";
            string      name2       = "David's Donut Shop";
            Vend        newVend1    = new Vend(name1);
            Vend        newVend2    = new Vend(name2);
            List <Vend> newVendList = new List <Vend> {
                newVend1, newVend2
            };

            List <Vend> result = Vend.GetAllVends();

            CollectionAssert.AreEqual(newVendList, result);
        }
예제 #2
0
        [HttpGet("/vendors")] //displays the page that shows a list of all the vendors
        public ActionResult Index()
        {
            List <Vend> allVendors = Vend.GetAllVends();

            return(View(allVendors));
        }