public void TestUndirectedPaymentAllocation_Jane6a()
 {
     using (InRuleServiceClient serviceClient = new InRuleServiceClient())
     {
         InRuleResponse response         = serviceClient.PaymentAllocationRules(GetRequestFromFile("InRuleRequestJane6a.xml"));
         InRuleResponse expectedResponse = GetResponseFromFile("InRuleResponseJane6a.xml");
         Assert.IsTrue(response.RuleInfo.Status == "Success");
         Assert.IsTrue(IsResponseCorrect(response, expectedResponse));
     }
 }
        public void TestDirectedPaymentAllocation()
        {
            using (InRuleServiceClient serviceClient = new InRuleServiceClient())
            {
                XmlSerializer reader  = new XmlSerializer(typeof(InRuleRequest));
                StreamReader  file    = new StreamReader(Settings.Default.TestFilesPath + "InRuleRequestDirected.xml");
                InRuleRequest request = new InRuleRequest();
                request = (InRuleRequest)reader.Deserialize(file);

                InRuleResponse response = serviceClient.PaymentAllocationRules(request);
            }
        }
 public void TestUndirectedPaymentAllocation_MissingFederal()
 {
     using (InRuleServiceClient serviceClient = new InRuleServiceClient())
     {
         InRuleResponse response = serviceClient.PaymentAllocationRules(GetRequestFromFile("InRuleRequest_missing_federal.xml"));
         //Failure if response validation is enabled on the server
         Assert.IsTrue(response.RuleInfo.Status == "Failure");
         //Success if response validation is not enabled on the server
         //Assert.IsTrue(response.RuleInfo.Status == "Failure");
         Assert.IsTrue(response.RuleInfo.ErrorDetails.Count > 0);
     }
 }
Пример #4
0
 static void Main(string[] args)
 {
     try
     {
         Console.WriteLine($"Request started at:{DateTime.Now}");
         var           reader       = new XmlSerializer(typeof(InRuleRequest));
         var           file         = new StreamReader("InRuleRequestJane1.xml");
         InRuleRequest request      = (InRuleRequest)reader.Deserialize(file);
         var           inRuleClient = new InRuleServiceClient();
         Console.WriteLine($"Request hit service at:{DateTime.Now}");
         var response = inRuleClient.PaymentAllocationRules(request);
         Console.WriteLine($"Service replied at:{DateTime.Now}");
     }
     catch (Exception ex)
     {
         Console.WriteLine($"Service replied at:{DateTime.Now}");
         Console.WriteLine(ex.Message);
     }
     finally
     {
         Console.ReadLine();
     }
 }