File tree 4 files changed +13
-7
lines changed
main/java/com/paypal/android/paypalwebpayments
test/java/com/paypal/android/paypalwebpayments 4 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -9,4 +9,4 @@ fun interface PayPalWebStartCallback {
9
9
*/
10
10
@MainThread
11
11
fun onPayPalWebStartResult (result : PayPalPresentAuthChallengeResult )
12
- }
12
+ }
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ internal class UpdateClientConfigAPI(
39
39
)
40
40
41
41
is LoadRawResourceResult .Failure -> UpdateClientConfigResult .Failure (
42
- PayPalSDKError (123 , " TODO: implement" )
42
+ PayPalSDKError (0 , " TODO: implement" )
43
43
)
44
44
}
45
45
}
@@ -98,4 +98,4 @@ internal class UpdateClientConfigAPI(
98
98
UpdateClientConfigResult .Failure (error)
99
99
}
100
100
}
101
- }
101
+ }
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import com.paypal.android.corepayments.PayPalSDKError
4
4
5
5
sealed class UpdateClientConfigResult {
6
6
7
- data class Success (val clientConfig : String ): UpdateClientConfigResult()
8
- data class Failure (val error : PayPalSDKError ): UpdateClientConfigResult()
7
+ data class Success (val clientConfig : String ) : UpdateClientConfigResult()
8
+ data class Failure (val error : PayPalSDKError ) : UpdateClientConfigResult()
9
9
}
10
-
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import io.mockk.mockk
9
9
import io.mockk.verify
10
10
import junit.framework.TestCase.assertSame
11
11
import junit.framework.TestCase.assertTrue
12
+ import kotlinx.coroutines.Dispatchers
12
13
import kotlinx.coroutines.ExperimentalCoroutinesApi
13
14
import org.junit.Before
14
15
import org.junit.Test
@@ -21,6 +22,7 @@ class PayPalWebCheckoutClientUnitTest {
21
22
22
23
private val activity: FragmentActivity = mockk(relaxed = true )
23
24
private val analytics = mockk<PayPalWebAnalytics >(relaxed = true )
25
+ private val updateClientConfigAPI = mockk<UpdateClientConfigAPI >(relaxed = true )
24
26
25
27
private val intent = Intent ()
26
28
@@ -30,7 +32,12 @@ class PayPalWebCheckoutClientUnitTest {
30
32
@Before
31
33
fun beforeEach () {
32
34
payPalWebLauncher = mockk(relaxed = true )
33
- sut = PayPalWebCheckoutClient (analytics, payPalWebLauncher)
35
+ sut = PayPalWebCheckoutClient (
36
+ analytics = analytics,
37
+ updateClientConfigAPI = updateClientConfigAPI,
38
+ payPalWebLauncher = payPalWebLauncher,
39
+ dispatcher = Dispatchers .Main
40
+ )
34
41
}
35
42
36
43
@Test
You can’t perform that action at this time.
0 commit comments