Esempio n. 1
0
        public void OutletList_FailedResponse_ThrowsServiceValidationException()
        {
            //1. Setup data
            //a.request
            var request = IesContractTestDataHelper.CreateDummyOutletListModel();

            //b.response
            var response = new OutletSearchResponse();

            response.ExecutionResult = IesContractTestDataHelper.CreateDummyFailedExecutionResult();

            mockContractSearchWcf.Setup(m => m.OutletSearch(It.IsAny <OutletSearchRequest>())).Returns(response);

            //2. exec
            var result = SystemUnderTest().ListOutlets(request);

            //3. Verification
        }
Esempio n. 2
0
        public void OutletUpdateSSC_FailedResponse_ThrowsServiceValidationException()
        {
            //1. Setup data
            //a.request

            IesOutletUpdateSSCRequestModel request = new IesOutletUpdateSSCRequestModel
            {
                CheckRelatedOutletFlag = "N",
                ContactName            = "TBA",
                ContractId             = "0205881K",
                EmailAddress           = null,
                EndDate   = new DateTime(2015, 6, 30),
                FaxNumber = null,
                IntegrityControlNumber = 118,
                MobileNumber           = null,
                PhoneNumber            = "0123456789",
                ProviderText           = "abc",
                RelatedOutlets         = null,
                SequenceNumber         = 1,
                StartDate                    = new DateTime(2009, 4, 2),
                SupervisingOffice            = "QLPU",
                SuspendClaimsFromDate        = DateTime.MinValue,
                SuspendEPFFromDate           = DateTime.MinValue,
                SuspendNewCaseFromDate       = DateTime.MinValue,
                SuspendRefsFromDate          = DateTime.MinValue,
                SuspendRelatedEntityFromDate = DateTime.MinValue,
                SuspendReturnFromDate        = DateTime.MinValue,
                SuspendTransportFromDate     = DateTime.MinValue
            };

            //b.response
            var response = new OutletUpdateSSCResponse();

            response.ExecutionResult = IesContractTestDataHelper.CreateDummyFailedExecutionResult();

            mockOutletUpdateWcf.Setup(m => m.UpdateOutletSSC(It.IsAny <OutletUpdateSSCRequest>())).Returns(response);

            //2. exec
            var result = SystemUnderTest().UpdateOutletSSC(request);

            //3. Verification
        }