Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEPA Launcher API [Tests] #814

Merged
merged 30 commits into from
Nov 6, 2023
Merged

Conversation

scannillo
Copy link
Contributor

Summary of changes

Checklist

  • Added a changelog entry

Authors

@scannillo

@scannillo scannillo requested a review from a team as a code owner November 1, 2023 20:30
verify(listener).onSEPADirectDebitSuccess(nonce);
verify(braintreeClient).sendAnalyticsEvent("sepa-direct-debit.tokenize.success");
sut.tokenize(sepaDirectDebitRequest, (sepaDirectDebitResponse, error) -> {
assertEquals(sepaDirectDebitResponse.getNonce(), nonce);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just confirming - are these callback assertions being invoked? I haven't seen this done without a countdown latch before

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these are! (Confirmed with breakpoints & making sure the tests failed when modified)

However I pushed a commit (a1b0434) to move these tests away from the callback syntax and to instead use ArgumentCaptor, to match with the standard way in this test file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh cool we maybe should move to that pattern eventually - seems cleaner. But good to go with the current pattern for now for consistency 👍

}

// Save for SEPABrowserSwitchResult_Tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be in separate file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think this test is covered here. Removed this commented out section in bd911a2

Base automatically changed from sepa-launcher-api to sepa-launcer-api-refactor November 6, 2023 15:00
@scannillo scannillo merged commit 41cb881 into sepa-launcer-api-refactor Nov 6, 2023
2 checks passed
@scannillo scannillo deleted the sepa-launcher-tests branch November 6, 2023 15:38
@scannillo scannillo mentioned this pull request Nov 6, 2023
1 task
scannillo added a commit that referenced this pull request Nov 6, 2023
* SEPA Launcher API [Source Code] (#812)
* SEPA Launcher API [Tests] (#814)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants