public void testDetailsReturnsTheAppropriateRowWhenValidIDPassed()
        {
            //Arrange
            var mock_db      = new Mock <IHypermartContext>();
            var ProductsList = new List <Product>
            {
                new Product {
                    ID = 1, Title = "FirstProduct", Description = "First Product In Database"
                }
            };
            var mockProducts = TestAPI.GenerateDBSet.CreateMockDBSet <Product>(ProductsList);

            mock_db.Setup(x => x.Products).Returns(mockProducts.Object);
            ProductsController SUT = new ProductsController(mock_db.Object);
            //Act
            var result = SUT.Details(1);

            //Assert
            Assert.IsInstanceOf <ViewResult>(result);
        }
        public void testDetailsReturnsTheAppropriateErrorWhenNullIDPassed(int?productID, HttpStatusCode expected)
        {
            //Arrange
            var mock_db      = new Mock <IHypermartContext>();
            var ProductsList = new List <Product>
            {
                new Product {
                    ID = 1, Title = "FirstProduct", Description = "First Product In Database"
                }
            };
            var mockProducts = TestAPI.GenerateDBSet.CreateMockDBSet <Product>(ProductsList);

            mock_db.Setup(x => x.Products).Returns(mockProducts.Object);
            ProductsController SUT = new ProductsController(mock_db.Object);
            //Act
            var result = SUT.Details(productID);

            //Assert
            Assert.IsInstanceOf <HttpStatusCodeResult>(result);
            Assert.AreEqual(expected, (HttpStatusCode)(result as HttpStatusCodeResult).StatusCode);
        }