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
EIT-2304: Feature - Cash App Orders #184
Conversation
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.
Took a first pass at the code, and a left a few comment. Ping me if you need me to clarify anything in here.
afterpay/src/main/kotlin/com/afterpay/android/cashapp/AfterpayCashAppApi.kt
Outdated
Show resolved
Hide resolved
afterpay/src/main/kotlin/com/afterpay/android/cashapp/AfterpayCashAppApi.kt
Outdated
Show resolved
Hide resolved
afterpay/src/main/kotlin/com/afterpay/android/AfterpayEnvironment.kt
Outdated
Show resolved
Hide resolved
afterpay/src/main/kotlin/com/afterpay/android/cashapp/AfterpayCashApp.kt
Outdated
Show resolved
Hide resolved
example/src/main/kotlin/com/example/afterpay/checkout/CheckoutFragment.kt
Outdated
Show resolved
Hide resolved
example/src/main/kotlin/com/example/afterpay/data/CheckoutRequest.kt
Outdated
Show resolved
Hide resolved
example/src/main/kotlin/com/example/afterpay/receipt/CashReceiptFragment.kt
Outdated
Show resolved
Hide resolved
Adding Dev Options menu for easier dev and QA
…ndroid into feature/EIT-2304-cash-app
…vements EIT-2304: cash request function improvements
…d-clarity EIT-2304: make cash token signing method more clear
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.
Love to see better Unit Test coverage. 👏🏻
LGTM!
every { connection.requestMethod = "POST" } returns Unit | ||
every { connection.doInput = true } returns Unit | ||
every { connection.doOutput = true } returns Unit | ||
every { connection.setRequestProperty(any(), any()) } returns Unit | ||
every { connection.outputStream } returns ByteArrayOutputStream() |
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.
Nit: I wonder if we used relaxed = true
when defining the mock above, if we would still need to define all of this "stubs". Might be worth trying if that works, if so could remove this entire block on the setup
.
eg.: private val connection = mockk<HttpsURLConnection>(relaxed = 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.
Nice work here!
LGTM
Summary of Changes