コード例 #1
0
        public void Find_ReturnsCorrectItem_Item()
        {
            //Arrange
            CampingItems newItem  = new CampingItems("flashlight", 4, 11, true, "Noah");
            CampingItems newItem2 = new CampingItems("backpack", 6, 15, true, "Isaac");

            //Act
            CampingItems result = CampingItems.Find(2);

            //Assert
            Assert.AreEqual(newItem2.Item, result.Item);
        }
コード例 #2
0
        public ActionResult Show(int id)
        {
            CampingItems foundItem = CampingItems.Find(id);

            return(View(foundItem));
        }