Exemplo n.º 1
0
        public void DeleteSupplierTest()
        {
            ITEMModel model = new ITEMModel {
                ITCODE = "1"
            };

            mockItemRepository.Setup(s => s.GetItemByItemCode(It.IsAny <string>())).Returns(model);
            var result = controller.DeleteITEM(model.ITCODE);

            Assert.IsInstanceOfType(result, typeof(OkResult));
        }
Exemplo n.º 2
0
        public void Items_DeleteItem_ShouldReturnOK()
        {
            //Arrange
            //Initialize();

            //Act
            OkNegotiatedContentResult <ITEM> result = itemController.DeleteITEM("1") as OkNegotiatedContentResult <ITEM>;

            Assert.IsNotNull(result);
            Assert.AreEqual("1", result.Content.ITCODE);
        }