public void EditItemCategoryTest()
        {
            //Arrange
            string expected = "Testing EditSupplier";

            //Instantiate controller
            ItemCategoryController controller = new ItemCategoryController()
            {
                CurrentUserName = "******",
                context         = this.context
            };

            controller.ModelState.Clear();

            //Assemble a ItemCategory ViewModel from existing test object
            ItemCategory          ic = context.ItemCategory.Where(x => x.Name == "TEST").First();
            ItemCategoryViewModel VM = new ItemCategoryViewModel()
            {
                ItemCategoryId = ic.ItemCategoryId,
                Name           = ic.Name,
                Description    = expected
            };

            //Act
            //pass ViewModel to controller
            controller.Save(VM);

            var result = itemcategoryRepository.FindById(VM.ItemCategoryId);

            //Assert
            //check that entry has been updated in db
            Assert.AreEqual(expected, result.Description);
        }
        public void AddNewItemCategoryTest()
        {
            //Arrange
            //Instantiate controller
            ItemCategoryController controller = new ItemCategoryController()
            {
                CurrentUserName = "******",
                context         = this.context
            };

            controller.ModelState.Clear();

            //create new ViewModel to Save via controller
            ItemCategoryViewModel newItemCategory = new ItemCategoryViewModel()
            {
                ItemCategoryId = IdService.GetNewItemCategoryId(context),
                Name           = "TEST"
            };

            //Act
            ActionResult result = controller.Save(newItemCategory);

            //Assert
            Assert.IsNotNull(result);
        }