Skip to content

Commit

Permalink
Update PaymentMethod constant list with new payment methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Viincenttt committed Jul 7, 2024
1 parent 9f39442 commit 77298f2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
10 changes: 9 additions & 1 deletion src/Mollie.Api/Models/Payment/PaymentMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,13 @@ public static class PaymentMethod {
public const string In3 = "in3";
public const string PointOfSale = "pointofsale";
public const string Billie = "billie";
public const string Trustly = "trustly";
public const string Twint = "twint";
public const string Satispay = "satispay";
public const string Riverty = "riverty";
public const string Blik = "blik";
public const string BancomatPay = "bancomat_pay";
public const string BacsDirectDebit = "bacs";
public const string Alma = "alma";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,25 @@ public class PaymentResponseFactoryTests {
[InlineData(PaymentMethod.MealVoucher, typeof(PaymentResponse))]
[InlineData(PaymentMethod.In3, typeof(PaymentResponse))]
[InlineData(PaymentMethod.PointOfSale, typeof(PointOfSalePaymentResponse))]
[InlineData(PaymentMethod.Billie, typeof(PaymentResponse))]
[InlineData(PaymentMethod.Trustly, typeof(PaymentResponse))]
[InlineData(PaymentMethod.Twint, typeof(PaymentResponse))]
[InlineData(PaymentMethod.Satispay, typeof(PaymentResponse))]
[InlineData(PaymentMethod.Riverty, typeof(PaymentResponse))]
[InlineData(PaymentMethod.Blik, typeof(PaymentResponse))]
[InlineData(PaymentMethod.BancomatPay, typeof(PaymentResponse))]
[InlineData(PaymentMethod.BacsDirectDebit, typeof(PaymentResponse))]
[InlineData(PaymentMethod.Alma, typeof(PaymentResponse))]
[InlineData("UnknownPaymentMethod", typeof(PaymentResponse))]
public void Create_CreatesTypeBasedOnPaymentMethod(string paymentMethod, Type expectedType) {
// Given
var sut = new PaymentResponseFactory();

// When
var result = sut.Create(paymentMethod);

// Then
result.Should().BeOfType(expectedType);
}
}
}
}

0 comments on commit 77298f2

Please sign in to comment.