Skip to content

Commit

Permalink
Add status field to capture client unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Viincenttt committed Dec 2, 2023
1 parent b22b80d commit bd0ebe0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/Mollie.Tests.Unit/Client/CaptureClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class CaptureClientTests : BaseClientTests {
private const string defaultSettlementId = "settlementId";
private const string defaultAmountValue = "1027.99";
private const string defaultAmountCurrency = "EUR";
private const string defaultStatus = "succeeded";

private string defaultCaptureJsonResponse = $@"{{
""resource"": ""capture"",
Expand All @@ -35,6 +36,7 @@ public class CaptureClientTests : BaseClientTests {
""paymentId"": ""{defaultPaymentId}"",
""shipmentId"": ""{defaultShipmentId}"",
""settlementId"": ""{defaultSettlementId}"",
""status"": ""{defaultStatus}"",
""createdAt"": ""2018-08-02T09:29:56+00:00"",
}}";

Expand All @@ -56,6 +58,7 @@ public class CaptureClientTests : BaseClientTests {
""paymentId"": ""{defaultPaymentId}"",
""shipmentId"": ""{defaultShipmentId}"",
""settlementId"": ""{defaultSettlementId}"",
""status"": ""{defaultStatus}"",
""createdAt"": ""2018-08-02T09:29:56+00:00""
}}
]
Expand Down Expand Up @@ -117,6 +120,7 @@ public async Task GetCaptureAsync_DefaultBehaviour_ResponseIsParsed() {
captureResponse.SettlementId.Should().Be(defaultSettlementId);
captureResponse.Amount.Value.Should().Be(defaultAmountValue);
captureResponse.Amount.Currency.Should().Be(defaultAmountCurrency);
captureResponse.Status.Should().Be(defaultStatus);
}

[Fact]
Expand All @@ -140,6 +144,7 @@ public async Task GetCapturesListAsync_DefaultBehaviour_ResponseIsParsed() {
captureResponse.SettlementId.Should().Be(defaultSettlementId);
captureResponse.Amount.Value.Should().Be(defaultAmountValue);
captureResponse.Amount.Currency.Should().Be(defaultAmountCurrency);
captureResponse.Status.Should().Be(defaultStatus);
}

[Theory]
Expand Down

0 comments on commit bd0ebe0

Please sign in to comment.