public void TestRecurringRequest_OnlyRequired() { var request = new RecurringRequest { Subscription = new Subscription { PlanCode = "123abc" } }; var xml = request.Serialize(); var pattern = FormMatchExpression( "<subscription>", "<planCode>123abc</planCode>", "</subscription>"); var match = Regex.Match(xml, pattern); Assert.IsTrue(match.Success, xml); }
public void TestRecurringRequest_Full() { var request = new RecurringRequest { Subscription = new Subscription { PlanCode = "123abc", NumberOfPayments = 10, StartDate = new DateTime(2013, 7, 25), Amount = 102 } }; var xml = request.Serialize(); var pattern = FormMatchExpression( "<subscription>", "<planCode>123abc</planCode>", "<numberOfPayments>10</numberOfPayments>", "<startDate>2013-07-25</startDate>", "<amount>102</amount>", "</subscription>"); var match = Regex.Match(xml, pattern); Assert.IsTrue(match.Success, xml); }