コード例 #1
0
        public void VerifyEDIComplianceRules()
        {
            UpdateCustomer();
            response1 = HttpMethods.XmlDeserialize <SoapService.ResponseEntities.Envelope>(HttpMethods.CallWebService(ConfigurationManager.AppSettings["UAT_URL"], "", HttpMethods.XmlSerialize(CreateLoad(new Envelope()))));
            ClearLoadExceptions(response1.Body.CreateLoad30Response.LoadId);
            var gtLoad = GetLoad(response1.Body.CreateLoad30Response.LoadId);

            Assert.AreEqual("Shipment Planning", gtLoad.body.loadQBDetails[0].loadStatus, "Verify created EDI load is in 'Shipment Planning' status after clearing compliance rules.");
        }
コード例 #2
0
        public void ClearEDILoadException()
        {
            response = HttpMethods.XmlDeserialize <SoapService.ResponseEntities.Envelope>(HttpMethods.CallWebService(ConfigurationManager.AppSettings["UAT_URL"], "", HttpMethods.XmlSerialize(CreateLoad(new Envelope()))));
            var gtLoad = GetLoad(response.Body.CreateLoad30Response.LoadId);

            Assert.AreEqual("200", response.Body.CreateLoad30Response.Response, $"Verify status of the EDI create load response: {response.Body.CreateLoad30Response.Response}");
            Assert.NotNull(response.Body.CreateLoad30Response.LoadId, "Verify the created EDI loadId:" + response.Body.CreateLoad30Response.LoadId);
            Assert.AreEqual("OK", gtLoad.statusCode, "Verify created load through EDI is available in PLS3.0");
            Assert.AreEqual(response.Body.CreateLoad30Response.LoadId, gtLoad.body.loadQBDetails[0].loadId.ToString(), $"Verify EDI Load ID:{response.Body.CreateLoad30Response.LoadId} with PLS3.0 Load ID:{ gtLoad.body.loadQBDetails[0].loadId}");
            ClearLoadExceptions(response.Body.CreateLoad30Response.LoadId);
            var stLoad = loadRest.GetEDIStgedLoads().body.ediStagingLoadsDTO.Find(ld => ld.loadId == Convert.ToInt32(gtLoad.body.loadQBDetails[0].loadId));

            Assert.AreEqual(gtLoad.body.loadQBDetails[0].loadId, stLoad.loadId, "Verify created EDI load is in staging status after clearing load exceptions.");
        }