Beispiel #1
0
        public void DeleteScheduleDetail_Static_ErrorResponse_Failure()
        {
            _mockTransport.Setup(x => x.GetCupiResponse(It.IsAny <string>(), It.IsAny <MethodType>(), It.IsAny <ConnectionServerRest>(),
                                                        It.IsAny <string>(), true)).Returns(new WebCallResult
            {
                Success      = false,
                ResponseText = "error text",
                StatusCode   = 404
            });

            var res = ScheduleDetail.DeleteScheduleDetail(_mockServer, "ScheduleObjectId", "ScheduleDetailObjectId");

            Assert.IsFalse(res.Success, "Calling DeleteScheduleDetail with ErrorResponse did not fail");
        }
        public void DeleteScheduleDetail_InvalidObjectIds_Failure()
        {
            var res = ScheduleDetail.DeleteScheduleDetail(_connectionServer, "scheduleId", "ScheduleDetailObjectId");

            Assert.IsFalse(res.Success, "Static call to DeleteScheduleDetail did not fail with blank objectId ");
        }
Beispiel #3
0
        public void DeleteScheduleDetail_EmptyDetailObjectId_Failure()
        {
            var res = ScheduleDetail.DeleteScheduleDetail(_mockServer, "scheduleId", "");

            Assert.IsFalse(res.Success, "Static call to DeleteScheduleDetail did not fail with blank objectId ");
        }
Beispiel #4
0
        public void DeleteScheduleDetail_NullConnectionServer_Failure()
        {
            var res = ScheduleDetail.DeleteScheduleDetail(null, "scheduleobjectId", "detailobjectid");

            Assert.IsFalse(res.Success, "Static call to DeleteScheduleDetail did not fail with null Connection server");
        }