public void Index_Returns_Data_To_View()
        {
            var mockItemRepo = new Mock<IItemRepository>();
            var mockItemTypeRepo = new Mock<IItemTypeRepository>();
            var mockItemImageRepo = new Mock<IItemImageRepository>();

            mockItemRepo.Setup(p => p.GetAll()).Returns(testData);

            var itemController = new ItemController(mockItemRepo.Object, mockItemTypeRepo.Object, mockItemImageRepo.Object);

            var result = itemController.Index();

            Assert.IsInstanceOfType(typeof(ViewResult), result);
            var viewResult = (ViewResult) result;
            var model = (IList<Item>) viewResult.ViewData.Model;

            Assert.AreEqual(testData.Count, model.Count);
        }
        public void Index_Returns_View()
        {
            var mockItemRepo = new Mock<IItemRepository>();
            var mockItemTypeRepo = new Mock<IItemTypeRepository>();
            var mockItemImageRepo = new Mock<IItemImageRepository>();

            var itemController = new ItemController(mockItemRepo.Object, mockItemTypeRepo.Object, mockItemImageRepo.Object);

            var result = itemController.Index();

            Assert.IsInstanceOfType(typeof(ViewResult), result);
        }