Skip to content

Commit 12d7af8

Browse files
Update all services (#1080)
* false[adyen-sdk-automation] automated change * removed tests for removed classes in service update --------- Co-authored-by: Djoyke Reijans <[email protected]>
1 parent ca50b28 commit 12d7af8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3033
-4474
lines changed

Adyen.IntegrationTest/BaseTest.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,6 @@ public Model.Checkout.PaymentRequest CreatePaymentRequestIDealCheckout()
251251
return paymentsRequest;
252252
}
253253

254-
protected Model.Checkout.PaymentSetupRequest CreatePaymentSessionRequest()
255-
{
256-
return new Model.Checkout.PaymentSetupRequest(merchantAccount: ClientConstants.MerchantAccount, reference: "MerchantReference", shopperLocale: "nl_NL",
257-
channel: Model.Checkout.PaymentSetupRequest.ChannelEnum.Web, sdkVersion: "1.3.0",
258-
amount: new Model.Checkout.Amount("EUR", 1200), returnUrl: @"https://www.yourshop.com/checkout/result", countryCode: "NL",shopperReference:"ShopperIdAlex");
259-
}
260-
261254
protected Model.Payment.Card CreateTestCard()
262255
{
263256
return new Model.Payment.Card(number: "4111111111111111", expiryMonth: "03", expiryYear: "2030", cvc: "737",

Adyen.IntegrationTest/CheckoutTest.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public class CheckoutTest : BaseTest
1717
private RecurringService _recurring;
1818
private ModificationsService _modifications;
1919
private PaymentLinksService _paymentLinksService;
20-
private ClassicCheckoutSDKService _classicCheckoutSdkService;
2120
private PaymentsService _paymentsService;
2221
private static readonly string MerchantAccount = ClientConstants.MerchantAccount;
2322

@@ -29,7 +28,7 @@ public void Init()
2928
_recurring = new RecurringService(_client);
3029
_modifications = new ModificationsService(_client);
3130
_paymentLinksService = new PaymentLinksService(_client);
32-
_classicCheckoutSdkService = new ClassicCheckoutSDKService(_client);
31+
// _classicCheckoutSdkService = new ClassicCheckoutSDKService(_client);
3332
_paymentsService = new PaymentsService(_client);
3433
}
3534

@@ -113,14 +112,6 @@ public void PaymentWithIdealTest()
113112
Assert.AreEqual(paymentResponse.ResultCode, PaymentResponse.ResultCodeEnum.RedirectShopper);
114113
}
115114

116-
[TestMethod]
117-
public void PaymentSessionTest()
118-
{
119-
var paymentSessionRequest = CreatePaymentSessionRequest();
120-
var paymentSessionResponse = _classicCheckoutSdkService.PaymentSession(paymentSessionRequest);
121-
Assert.IsNotNull(paymentSessionResponse.PaymentSession);
122-
}
123-
124115
[TestMethod]
125116
public void PaymentLinksSuccessTest()
126117
{

Adyen.Test/BaseTest.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -193,27 +193,6 @@ protected Amount.PaymentMethodsRequest CreatePaymentMethodRequest(string merchan
193193
return new Amount.PaymentMethodsRequest(merchantAccount: merchantAccount);
194194
}
195195

196-
/// <summary>
197-
/// Checkout paymentsessionRequest
198-
/// </summary>
199-
/// <returns></returns>
200-
protected Amount.PaymentSetupRequest CreatePaymentSetupRequest()
201-
{
202-
return new Amount.PaymentSetupRequest(merchantAccount: "MerchantAccount", reference: "MerchantReference",
203-
amount: new Model.Checkout.Amount("EUR", 1200), returnUrl: @"https://your-company.com/...", countryCode: "NL",
204-
channel: Amount.PaymentSetupRequest.ChannelEnum.Web, sdkVersion: "1.3.0", captureDelayHours:0);
205-
}
206-
207-
/// <summary>
208-
/// Checkout paymentResultRequest
209-
/// </summary>
210-
/// <returns></returns>
211-
protected Amount.PaymentVerificationRequest CreatePaymentVerificationRequest()
212-
{
213-
var payload = @"Ab0oCC2/wy96FiEMLvoI8RfayxEmZHQZcw...riRbNBzP3pQscLYBHN/MfZkgfGHdqy7JfQoQbRUmA==";
214-
return new Amount.PaymentVerificationRequest(payload: payload);
215-
}
216-
217196
#endregion
218197

219198
/// <summary>

Adyen.Test/CheckoutTest.cs

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -190,23 +190,6 @@ public void Payments3DS2Test()
190190
Assert.IsNotNull(paymentResponse.Action.GetCheckoutThreeDS2Action().PaymentData);
191191
}
192192

193-
/// <summary>
194-
/// Test 3ds success flow for
195-
/// POST /payments/result
196-
/// </summary>
197-
[TestMethod]
198-
public void PaymentsAuthorise3ds2ResultSuccessTest()
199-
{
200-
var paymentResultRequest = CreatePaymentVerificationRequest();
201-
var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/threedsecure2/authorise3ds2-success.json");
202-
var checkout = new ClassicCheckoutSDKService(client);
203-
var paymentResultResponse = checkout.VerifyPaymentResult(paymentResultRequest);
204-
Assert.IsNotNull(paymentResultResponse.AdditionalData);
205-
Assert.AreEqual(paymentResultResponse.AdditionalData["cvcResult"], "1 Matches");
206-
Assert.AreEqual(paymentResultResponse.MerchantReference, "your_merchantReference");
207-
Assert.AreEqual(paymentResultResponse.ResultCode, PaymentVerificationResponse.ResultCodeEnum.Authorised);
208-
}
209-
210193
/// <summary>
211194
/// Test error flow for
212195
/// POST /payments
@@ -402,96 +385,6 @@ public void PaymentMethodsWithoutBrandsTest()
402385
Assert.AreEqual(paymentMethodsResponse.PaymentMethods.Count, 50);
403386
}
404387

405-
406-
/// <summary>
407-
/// Test success flow for
408-
/// POST /paymentSession
409-
/// </summary>
410-
[TestMethod]
411-
public void PaymentSessionSuccessTest()
412-
{
413-
var paymentSessionRequest = CreatePaymentSetupRequest();
414-
var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentsession-success.json");
415-
var checkout = new ClassicCheckoutSDKService(client);
416-
var paymentSessionResponse = checkout.PaymentSession(paymentSessionRequest);
417-
Assert.IsNotNull(paymentSessionResponse.PaymentSession);
418-
}
419-
420-
/// <summary>
421-
/// Test success flow for async
422-
/// POST /paymentSession
423-
/// </summary>
424-
[TestMethod]
425-
public async Task PaymentSessionAsyncSuccessTest()
426-
{
427-
var paymentSetupRequest = CreatePaymentSetupRequest();
428-
var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentsession-success.json");
429-
var checkout = new ClassicCheckoutSDKService(client);
430-
var paymentSetupResponse = await checkout.PaymentSessionAsync(paymentSetupRequest);
431-
Assert.IsNotNull(paymentSetupResponse.PaymentSession);
432-
}
433-
434-
/// <summary>
435-
/// Test success flow for
436-
/// POST /paymentSession
437-
/// </summary>
438-
[TestMethod]
439-
public void PaymentSessionErrorTest()
440-
{
441-
var paymentSetupRequest = CreatePaymentSetupRequest();
442-
var client =
443-
CreateMockTestClientApiKeyBasedRequestAsync(
444-
"mocks/checkout/paymentsession-error-invalid-data-422.json");
445-
var checkout = new ClassicCheckoutSDKService(client);
446-
var paymentSetupResponse = checkout.PaymentSession(paymentSetupRequest);
447-
Assert.IsNull(paymentSetupResponse.PaymentSession);
448-
}
449-
450-
/// <summary>
451-
/// Test success flow for
452-
/// POST /payments/result
453-
/// </summary>
454-
[TestMethod]
455-
public void PaymentsResultSuccessTest()
456-
{
457-
var paymentResultRequest = CreatePaymentVerificationRequest();
458-
var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentsresult-success.json");
459-
var checkout = new ClassicCheckoutSDKService(client);
460-
var paymentResultResponse = checkout.VerifyPaymentResult(paymentResultRequest);
461-
Assert.AreEqual(paymentResultResponse.ResultCode, PaymentVerificationResponse.ResultCodeEnum.Authorised);
462-
}
463-
464-
/// <summary>
465-
/// Test success flow for async
466-
/// POST /payments/result
467-
/// </summary>
468-
[TestMethod]
469-
public async Task PaymentsResultAsyncSuccessTest()
470-
{
471-
var paymentVerificationRequest = CreatePaymentVerificationRequest();
472-
var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentsresult-success.json");
473-
var checkout = new ClassicCheckoutSDKService(client);
474-
var paymentVerificationResponse = await checkout.VerifyPaymentResultAsync(paymentVerificationRequest);
475-
Assert.AreEqual(paymentVerificationResponse.ResultCode,
476-
PaymentVerificationResponse.ResultCodeEnum.Authorised);
477-
}
478-
479-
/// <summary>
480-
/// Test success flow for
481-
/// POST /payments/result
482-
/// </summary>
483-
[TestMethod]
484-
public void PaymentsResultErrorTest()
485-
{
486-
var paymentResultRequest = CreatePaymentVerificationRequest();
487-
var client =
488-
CreateMockTestClientApiKeyBasedRequestAsync(
489-
"mocks/checkout/paymentsresult-error-invalid-data-payload-422.json");
490-
var checkout = new ClassicCheckoutSDKService(client);
491-
var paymentResultResponse = checkout.VerifyPaymentResult(paymentResultRequest);
492-
Assert.IsNull(paymentResultResponse.ResultCode);
493-
}
494-
495388
[TestMethod]
496389
public void ApplicationInfoTest()
497390
{

Adyen.Test/ExtensionsTest.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,6 @@ public void TestDeviceRenderOptionsObjectListToString()
3737
Assert.IsTrue(deviceRenderOptions.ToJson().Contains(expected));
3838
}
3939

40-
[TestMethod]
41-
public void TestToCollectionsStringEmpty()
42-
{
43-
var paymentVerificationResponse = new PaymentVerificationResponse(merchantReference: "ref",
44-
shopperLocale: "NL",
45-
additionalData: new Dictionary<string, string> { { "scaExemptionRequested", "lowValue" } });
46-
var expected = "\"scaExemptionRequested\": \"lowValue\"";
47-
Assert.IsTrue(paymentVerificationResponse.ToJson().Contains(expected));
48-
}
49-
5040
[TestMethod]
5141
public void TestPalLiveEndPoint()
5242
{

Adyen/Model/Checkout/Avs.cs

Lines changed: 0 additions & 167 deletions
This file was deleted.

0 commit comments

Comments
 (0)