public async Task DoNotRetrievePricingWhenIncludeIsNull() { // When: retrieving the ideal method with the include parameter set to null PaymentMethodResponse paymentMethod = await PaymentMethodClient.GetPaymentMethodAsync(PaymentMethods.Ideal, includePricing : null); // Then: Issuers should not be included Assert.IsNull(paymentMethod.Pricing); }
public async Task DoNotRetrieveIssuersWhenIncludeIsFalse() { // When: retrieving the ideal method with the include parameter set to false PaymentMethodResponse paymentMethod = await PaymentMethodClient.GetPaymentMethodAsync(PaymentMethods.Ideal, false); // Then: Issuers should not be included Assert.IsNull(paymentMethod.Issuers); }
public async Task CanRetrievePricing() { // When: retrieving the ideal method we can include the issuers PaymentMethodResponse paymentMethod = await PaymentMethodClient.GetPaymentMethodAsync(PaymentMethods.Ideal, includePricing : true); // Then: We should have one or multiple issuers Assert.IsNotNull(paymentMethod); Assert.IsTrue(paymentMethod.Pricing.Any()); }
public async Task CanRetrieveIdealIssuers() { // When: retrieving the ideal method we can include the issuers var paymentMethod = await PaymentMethodClient.GetPaymentMethodAsync(PaymentMethods.Ideal, true); // Then: We should have one or multiple issuers Assert.NotNull(paymentMethod); Assert.True(paymentMethod.Issuers.Any()); }
public async Task CanRetrieveSinglePaymentMethod(PaymentMethods method) { // When: retrieving a payment method var paymentMethod = await PaymentMethodClient.GetPaymentMethodAsync(method); // Then: Make sure it can be retrieved Assert.NotNull(paymentMethod); Assert.Equal(method, paymentMethod.Id); }