public void TestDeletetItemCode_Successfully() { var testUpdatetItemCode = new ItemCodesController(); Mocker.MockContextHeader(testUpdatetItemCode); string id = "210F8DF4-34F9-4BA4-934A-A294972E447C"; JsonResult result = (JsonResult)testUpdatetItemCode.Delete(id); Console.WriteLine(result.Data); Assert.IsTrue((result.Data + "").Contains("Item deleted successfully.")); }
public void TestDeletetItemCodeID_Is_Null() { var testUpdatetItemCode = new ItemCodesController(); Mocker.MockContextHeader(testUpdatetItemCode); string id = ""; JsonResult result = (JsonResult)testUpdatetItemCode.Delete(id); Console.WriteLine(result.Data); Assert.IsTrue((result.Data + "").Contains("ItemCodeID is null")); }