From 6e764a5edcee951f8c1f2fe7395326662a856ca1 Mon Sep 17 00:00:00 2001 From: Jonas Hendrickx Date: Wed, 2 Apr 2025 13:37:57 +0200 Subject: [PATCH] Fix SubscriberServiceTests.cs --- .../Services/SubscriberServiceTests.cs | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/test/Core.Test/Billing/Services/SubscriberServiceTests.cs b/test/Core.Test/Billing/Services/SubscriberServiceTests.cs index 92917240c6..9e4be78787 100644 --- a/test/Core.Test/Billing/Services/SubscriberServiceTests.cs +++ b/test/Core.Test/Billing/Services/SubscriberServiceTests.cs @@ -1170,7 +1170,9 @@ public class SubscriberServiceTests { var stripeAdapter = sutProvider.GetDependency(); - stripeAdapter.CustomerGetAsync(provider.GatewayCustomerId) + stripeAdapter.CustomerGetAsync( + provider.GatewayCustomerId, + Arg.Is(p => p.Expand.Contains("tax") || p.Expand.Contains("tax_ids"))) .Returns(new Customer { Id = provider.GatewayCustomerId, @@ -1216,7 +1218,10 @@ public class SubscriberServiceTests { var stripeAdapter = sutProvider.GetDependency(); - stripeAdapter.CustomerGetAsync(provider.GatewayCustomerId) + stripeAdapter.CustomerGetAsync( + provider.GatewayCustomerId, + Arg.Is(p => p.Expand.Contains("tax") || p.Expand.Contains("tax_ids")) + ) .Returns(new Customer { Id = provider.GatewayCustomerId, @@ -1324,7 +1329,9 @@ public class SubscriberServiceTests { const string braintreeCustomerId = "braintree_customer_id"; - sutProvider.GetDependency().CustomerGetAsync(provider.GatewayCustomerId) + sutProvider.GetDependency().CustomerGetAsync( + provider.GatewayCustomerId, + Arg.Is(p => p.Expand.Contains("tax") || p.Expand.Contains("tax_ids"))) .Returns(new Customer { Id = provider.GatewayCustomerId, @@ -1376,7 +1383,9 @@ public class SubscriberServiceTests { const string braintreeCustomerId = "braintree_customer_id"; - sutProvider.GetDependency().CustomerGetAsync(provider.GatewayCustomerId) + sutProvider.GetDependency().CustomerGetAsync( + provider.GatewayCustomerId, + Arg.Is(p => p.Expand.Contains("tax") || p.Expand.Contains("tax_ids"))) .Returns(new Customer { Id = provider.GatewayCustomerId, @@ -1485,7 +1494,9 @@ public class SubscriberServiceTests { const string braintreeCustomerId = "braintree_customer_id"; - sutProvider.GetDependency().CustomerGetAsync(provider.GatewayCustomerId) + sutProvider.GetDependency().CustomerGetAsync( + provider.GatewayCustomerId, + Arg.Is(p => p.Expand.Contains("tax") || p.Expand.Contains("tax_ids"))) .Returns(new Customer { Id = provider.GatewayCustomerId