예제 #1
0
        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."));
        }
예제 #2
0
        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"));
        }