Exemplo n.º 1
0
        public void ShouldReturnValidGroupedInventoryListWhenGetIsCalled()
        {
            var response          = _controller.Get();
            var inventorGroupList = ((OkNegotiatedContentResult <IList <Web.Models.EatableGroup> >)response).Content.ToList();

            Assert.IsNotNull(inventorGroupList);
            Assert.IsTrue(inventorGroupList.Count == _mockInventoryGroupList.Count);
            Assert.IsTrue(inventorGroupList[0].Count == _mockInventoryGroupList[0].Count);
            Assert.IsTrue(inventorGroupList[0].Price == _mockInventoryGroupList[0].Price);
        }
Exemplo n.º 2
0
        public void Integration_ShouldGetAsGroupListOfEatables()
        {
            var response      = _controller.Get();
            var inventoryList = ((OkNegotiatedContentResult <IList <Web.Models.EatableGroup> >)response).Content.ToList();

            Assert.IsNotNull(inventoryList);
            Assert.IsTrue(inventoryList.Count > 0);
            Assert.IsTrue(inventoryList[0].Count > 0);
            Assert.IsTrue(inventoryList[1].Count > 0);
            Assert.IsTrue(inventoryList[2].Count > 0);
        }