当前位置: 首页>>代码示例>>C#>>正文


C# SubscriptionSearchRequest.ToXml方法代码示例

本文整理汇总了C#中Braintree.SubscriptionSearchRequest.ToXml方法的典型用法代码示例。如果您正苦于以下问题:C# SubscriptionSearchRequest.ToXml方法的具体用法?C# SubscriptionSearchRequest.ToXml怎么用?C# SubscriptionSearchRequest.ToXml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Braintree.SubscriptionSearchRequest的用法示例。


在下文中一共展示了SubscriptionSearchRequest.ToXml方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ToXML_EscapesGeneratedXMLForArrayElements

        public void ToXML_EscapesGeneratedXMLForArrayElements()
        {
            SubscriptionSearchRequest request = new SubscriptionSearchRequest().
                Ids.IncludedIn("<active");

            TestHelper.AssertIncludes("<ids type=\"array\"><item>&lt;active</item></ids>", request.ToXml());
        }
开发者ID:zxed,项目名称:braintree_dotnet,代码行数:7,代码来源:RequestTest.cs

示例2: ToXml_BillingCyclesRemainingLessThanOrEqualTo

 public void ToXml_BillingCyclesRemainingLessThanOrEqualTo()
 {
     SubscriptionSearchRequest request = new SubscriptionSearchRequest().BillingCyclesRemaining.LessThanOrEqualTo(12.34);
     var xml = "<search><billing-cycles-remaining><max>12.34</max></billing-cycles-remaining></search>";
     Assert.AreEqual(xml, request.ToXml());
 }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:6,代码来源:SubscriptionSearchRequestTest.cs

示例3: ToXml_PriceLessThanOrEqualTo

 public void ToXml_PriceLessThanOrEqualTo()
 {
     SubscriptionSearchRequest request = new SubscriptionSearchRequest().Price.LessThanOrEqualTo(12.34M);
     var xml = "<search><price><max>12.34</max></price></search>";
     Assert.AreEqual(xml, request.ToXml());
 }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:6,代码来源:SubscriptionSearchRequestTest.cs

示例4: ToXml_PriceBetween

 public void ToXml_PriceBetween()
 {
     SubscriptionSearchRequest request = new SubscriptionSearchRequest().Price.Between(1M, 2M);
     var xml = "<search><price><min>1</min><max>2</max></price></search>";
     Assert.AreEqual(xml, request.ToXml());
 }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:6,代码来源:SubscriptionSearchRequestTest.cs

示例5: ToXml_PriceIs

 public void ToXml_PriceIs()
 {
     SubscriptionSearchRequest request = new SubscriptionSearchRequest().Price.Is(1M);
     var xml = "<search><price><is>1</is></price></search>";
     Assert.AreEqual(xml, request.ToXml());
 }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:6,代码来源:SubscriptionSearchRequestTest.cs

示例6: ToXml_BillingCyclesRemainingBetween

 public void ToXml_BillingCyclesRemainingBetween()
 {
     SubscriptionSearchRequest request = new SubscriptionSearchRequest().BillingCyclesRemaining.Between(1, 2);
     var xml = "<search><billing-cycles-remaining><min>1</min><max>2</max></billing-cycles-remaining></search>";
     Assert.AreEqual(xml, request.ToXml());
 }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:6,代码来源:SubscriptionSearchRequestTest.cs

示例7: ToXML_EscapesGeneratedXMLForSearchCriteria

        public void ToXML_EscapesGeneratedXMLForSearchCriteria()
        {
            SubscriptionSearchRequest request = new SubscriptionSearchRequest().
                PlanId.Is("<my-id");

            TestHelper.AssertIncludes("<plan-id><is>&lt;my-id</is></plan-id>", request.ToXml());
        }
开发者ID:zxed,项目名称:braintree_dotnet,代码行数:7,代码来源:RequestTest.cs

示例8: ToXml_IdContains

 public void ToXml_IdContains()
 {
     SubscriptionSearchRequest request = new SubscriptionSearchRequest().Id.Contains("30");
     var xml = "<search><id><contains>30</contains></id></search>";
     Assert.AreEqual(xml, request.ToXml());
 }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:6,代码来源:SubscriptionSearchRequestTest.cs

示例9: ToXml_DaysPastDueBetween

 public void ToXml_DaysPastDueBetween()
 {
     SubscriptionSearchRequest request = new SubscriptionSearchRequest().DaysPastDue.Between(2, 3);
     var xml = "<search><days-past-due><min>2</min><max>3</max></days-past-due></search>";
     Assert.AreEqual(xml, request.ToXml());
 }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:6,代码来源:SubscriptionSearchRequestTest.cs

示例10: ToXml_DaysPastDueIs

 public void ToXml_DaysPastDueIs()
 {
     SubscriptionSearchRequest request = new SubscriptionSearchRequest().DaysPastDue.Is("30");
     var xml = "<search><days-past-due><is>30</is></days-past-due></search>";
     Assert.AreEqual(xml, request.ToXml());
 }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:6,代码来源:SubscriptionSearchRequestTest.cs

示例11: ToXml_PlanIdIncludedIn

 public void ToXml_PlanIdIncludedIn()
 {
     SubscriptionSearchRequest request = new SubscriptionSearchRequest().PlanId.IncludedIn("abc", "def");
     var xml = "<search><plan-id type=\"array\"><item>abc</item><item>def</item></plan-id></search>";
     Assert.AreEqual(xml, request.ToXml());
 }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:6,代码来源:SubscriptionSearchRequestTest.cs

示例12: ToXml_PlanIdStartsWith

 public void ToXml_PlanIdStartsWith()
 {
     SubscriptionSearchRequest request = new SubscriptionSearchRequest().PlanId.StartsWith("30");
     var xml = "<search><plan-id><starts-with>30</starts-with></plan-id></search>";
     Assert.AreEqual(xml, request.ToXml());
 }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:6,代码来源:SubscriptionSearchRequestTest.cs

示例13: ToXml_PlanIdIs

 public void ToXml_PlanIdIs()
 {
     SubscriptionSearchRequest request = new SubscriptionSearchRequest().PlanId.Is("abc");
     var xml = "<search><plan-id><is>abc</is></plan-id></search>";
     Assert.AreEqual(xml, request.ToXml());
 }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:6,代码来源:SubscriptionSearchRequestTest.cs

示例14: ToXml_BillingCyclesRemainingIs

 public void ToXml_BillingCyclesRemainingIs()
 {
     SubscriptionSearchRequest request = new SubscriptionSearchRequest().BillingCyclesRemaining.Is(1);
     var xml = "<search><billing-cycles-remaining><is>1</is></billing-cycles-remaining></search>";
     Assert.AreEqual(xml, request.ToXml());
 }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:6,代码来源:SubscriptionSearchRequestTest.cs

示例15: ToXML_DefaultsNullCriteriaToEmptyString

        public void ToXML_DefaultsNullCriteriaToEmptyString()
        {
            SubscriptionSearchRequest request = new SubscriptionSearchRequest().
                PlanId.Is(null);

            TestHelper.AssertIncludes("<plan-id><is></is></plan-id>", request.ToXml());
        }
开发者ID:zxed,项目名称:braintree_dotnet,代码行数:7,代码来源:RequestTest.cs


注:本文中的Braintree.SubscriptionSearchRequest.ToXml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。