Пример #1
0
        public void TestDraftNeedsSummary_Invalid_Guid()
        {
            string     id = "3A380F88-6B8B-40AF-AA14";
            var        testDraftNeedsSummary = new ProcurementsController();
            JsonResult result = (JsonResult)testDraftNeedsSummary.DraftNeedsSummary(id);

            Console.WriteLine(result.Data);
            Assert.IsTrue((result.Data + "").Contains("Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)"));
        }
Пример #2
0
        public void TestDraftNeedsSummary_Null_ID()
        {
            string     id = "";
            var        testDraftNeedsSummary = new ProcurementsController();
            JsonResult result = (JsonResult)testDraftNeedsSummary.DraftNeedsSummary(id);

            Console.WriteLine(result.Data);
            Assert.IsTrue((result.Data + "").Contains("DepartmentID is Null"));
        }
Пример #3
0
        public void TestDraftNeedsSummary()
        {
            var testDraftNeedsSummary = new ProcurementsController();

            Mocker.MockControllerContext(testDraftNeedsSummary, LOCAL_SERVER);
            string     id     = "8DEFC11D-5595-41DD-87A9-2A0EF5FE04B8";
            JsonResult result = (JsonResult)testDraftNeedsSummary.DraftNeedsSummary(id);

            Console.WriteLine(result.Data);
            Assert.IsTrue((result.Data + "").Contains("Drafted procurement Summary"));
        }