-
Notifications
You must be signed in to change notification settings - Fork 237
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
Update paypal request #1211
Update paypal request #1211
Conversation
@@ -19,7 +19,8 @@ cardinal = "2.2.7-5" | |||
navigationSafeArgsGradlePlugin = "2.5.0" | |||
playServices = "19.4.0" | |||
junit = "4.13.2" | |||
robolectric = "4.11.1" | |||
testParameterInjector = "1.18" | |||
robolectric = "4.14-beta-1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
google/TestParameterInjector#5
The 4.14-beta-1 release of Robolectric includes the new RobolectricTestParameterInjector that integrates with TestParameterInjector using the newly exposed APIs in TestParameterInjector 1.18.
PayPal/src/main/java/com/braintreepayments/api/paypal/PayPalVaultRequest.kt
Show resolved
Hide resolved
assertFalse(request.getHasUserLocationConsent()); | ||
} | ||
|
||
@Test | ||
public void setsValuesCorrectly() { | ||
public void setsValuesCorrectly(@TestParameter boolean appSwitchEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with Robolectric's TestParameter. Will it run the test with a random value? Or run the test multiple times with different values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd usually have to provide which values to run.
In this case though, since the value is a boolean, it just runs for false and true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, to be precise, @TestParameter
is from the TestParameterInjector library.
We can't have two @RunWith
classes; with 4.14-beta-1 robolectric now supports integration with TestParameterInjector
, which IMO, has a better and concise way of doing parameterized tests. Robolectric used to do it differently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will also want to change the base branch to the feature branch vs main. If one hasn't been created yet feel free to make it (I think the name is in the ticket).
CHANGELOG.md
Outdated
## unreleased | ||
|
||
* PayPal | ||
* Add `enablePayPalAppSwitch` property to `PayPalCheckoutRequest` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add an entry similar to what exists in 5.0.0
? That way we can more easily indicate this is in beta for the checkout flow as well.
Summary of changes
Checklist
Authors
@saperi22