public void Controller_FactoryInventory_Read_IDIsNull_Should_Pass()
        {
            // Arrange
            FactoryInventoryController controller = new FactoryInventoryController();
            string id = null;

            var context = CreateMoqSetupForCookie();

            controller.ControllerContext = new ControllerContext(context, new RouteData(), controller);

            // Act
            ViewResult result = controller.Read(id) as ViewResult;

            // Assert
            Assert.AreEqual(null, result.Model, TestContext.TestName);
        }
        public void Controller_FactoryInventory_Read_IDValid_Should_Pass()
        {
            // Arrange
            FactoryInventoryController controller = new FactoryInventoryController();
            FactoryInventoryModel      data       = new FactoryInventoryModel();
            string id = Backend.FactoryInventoryBackend.Instance.Create(data).Id;

            var context = CreateMoqSetupForCookie();

            controller.ControllerContext = new ControllerContext(context, new RouteData(), controller);

            // Act
            ViewResult result = controller.Read(id) as ViewResult;

            var resultFactoryInventoryModel = result.Model as FactoryInventoryModel;

            // Reset StudentBackend
            DataSourceBackend.Instance.Reset();

            // Assert
            Assert.IsNotNull(resultFactoryInventoryModel, TestContext.TestName);
        }