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)); }
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); }