-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Ignore case when checking equality * Update CHANGELOG.md Co-authored-by: Jax DesMarais-Leder <jdesmarais@paypal.com> --------- Co-authored-by: Jax DesMarais-Leder <jdesmarais@paypal.com>
- Loading branch information
1 parent
f8c1635
commit 3816fe1
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
PayPal/src/test/java/com/braintreepayments/api/paypal/PayPalPaymentIntentTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.braintreepayments.api.paypal | ||
|
||
import org.junit.Assert.assertEquals | ||
import org.junit.Assert.assertNotEquals | ||
import org.junit.Test | ||
|
||
class PayPalPaymentIntentTest { | ||
|
||
@Test | ||
fun `Test PayPalPaymentIntent fromString -- accepts case insensitive strings`() { | ||
assertEquals(PayPalPaymentIntent.ORDER, PayPalPaymentIntent.fromString("order")) | ||
assertEquals(PayPalPaymentIntent.ORDER, PayPalPaymentIntent.fromString("Order")) | ||
assertEquals(PayPalPaymentIntent.ORDER, PayPalPaymentIntent.fromString("ORDER")) | ||
} | ||
|
||
@Test | ||
fun `Test PayPalPaymentIntent fromString - random string fails equality`() { | ||
assertNotEquals(PayPalPaymentIntent.ORDER, PayPalPaymentIntent.fromString("random")) | ||
} | ||
} |