Skip to content

Commit

Permalink
Convert SEPADirectDebit module classes to Kotlin (#1131)
Browse files Browse the repository at this point in the history
* Convert SEPADirectDebit module classes to Kotlin

* Update CHANGELOG

* Chnage CreateMandateResult property mandateType to NonNull

* Set SEPADirectDebitInternalTokenizeCallback internal

---------

Co-authored-by: Ching-Hsiang Lin <[email protected]>
  • Loading branch information
chinghlinn and Ching-Hsiang Lin authored Aug 27, 2024
1 parent 17b2d2c commit 8b158f4
Show file tree
Hide file tree
Showing 21 changed files with 502 additions and 632 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
* Move `ThreeDSecureInfo` to `three-d-secure` module
* Add `CardResult` object
* Change `CardTokenizeCallback` parameters
* Change `BinType` from String to enum
* SEPA Direct Debit
* Update package name to `com.braintreepayments.api.sepadirectdebit`
* Remove `SEPADirectDebitLifecycleObserver` and `SEPADirectDebitListener`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import io.mockk.every
import io.mockk.impl.annotations.MockK
import io.mockk.slot
import io.mockk.verify
import org.json.JSONException
import org.json.JSONObject
import org.junit.Assert
import org.junit.Before
Expand All @@ -26,7 +25,8 @@ class DataCollectorUnitTest {
@MockK
lateinit var context: Context

@MockK lateinit var configuration: Configuration
@MockK
lateinit var configuration: Configuration

@MockK
lateinit var uuidHelper: UUIDHelper
Expand All @@ -48,7 +48,6 @@ class DataCollectorUnitTest {
.build()

@Before
@Throws(JSONException::class)
fun beforeEach() {

MockKAnnotations.init(this, relaxed = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ class MagnesInternalClientUnitTest {

@Test
fun getClientMetaDataId_returnsEmptyStringWhenContextIsNull() {
val sut = MagnesInternalClient(magnesSDK)
val result = sut.getClientMetadataId(
null, sandboxConfiguration,
dataCollectorInternalRequest
)
val sut = MagnesInternalClient(magnesSDK)
val result = sut.getClientMetadataId(
null, sandboxConfiguration,
dataCollectorInternalRequest
)

Assert.assertEquals("", result)
}
Assert.assertTrue(result.isEmpty())
}

@Throws(InvalidInputException::class)
@Test
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.braintreepayments.api.sepadirectdebit

data class CreateMandateResult internal constructor(
val approvalUrl: String,
val ibanLastFour: String,
val customerId: String,
val bankReferenceToken: String,
val mandateType: SEPADirectDebitMandateType
)

This file was deleted.

Loading

0 comments on commit 8b158f4

Please sign in to comment.