PayPalInAppPurchasesTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.InAppPurchase.PayPal.Tests PayPalInAppPurchasesTests

Namespace: DeltaEngine.InAppPurchase.PayPal.Tests
Assembly: DeltaEngine.InAppPurchase.PayPal.Tests (in DeltaEngine.InAppPurchase.PayPal.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class PayPalInAppPurchasesTests

The PayPalInAppPurchasesTests type exposes the following members.

Constructors

  NameDescription
Public methodPayPalInAppPurchasesTests
Initializes a new instance of the PayPalInAppPurchasesTests class
Top
Methods

  NameDescription
Public methodCreateInstance
Public methodGeneratePaymentLink
Public methodPurchaseProductOpenWebBrowser
Top
Examples

[Test]
public void CreateInstance()
{
    Assert.DoesNotThrow(() => GetPayPalInAppPurchases());
}
[Test]
public void GeneratePaymentLink()
{
    const string ExpectedLink = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=" +
        "payments@example.com&lc=DE&item_name=testId&currency_code=EUR&amount=1.99&bn=PP%2dDonationsBF";
    var inAppPurchase = GetPayPalInAppPurchases();
    Assert.AreEqual(inAppPurchase.GeneratePaymentLink(GetTestProductData()), ExpectedLink);
}
[Test, Ignore]
public void PurchaseProductOpenWebBrowser()
{
    var inAppPurchase = GetPayPalInAppPurchases();
    inAppPurchase.PurchaseProductAsync(GetTestProductData());
}
See Also