diff --git a/example/src/androidTestDebug/java/com/stripe/example/activity/AddFpxPaymentMethodTest.kt b/example/src/androidTestDebug/java/com/stripe/example/activity/AddFpxPaymentMethodTest.kt index ed5b7c9b0de..1f2ef8dae27 100644 --- a/example/src/androidTestDebug/java/com/stripe/example/activity/AddFpxPaymentMethodTest.kt +++ b/example/src/androidTestDebug/java/com/stripe/example/activity/AddFpxPaymentMethodTest.kt @@ -23,10 +23,7 @@ import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) @LargeTest class AddFpxPaymentMethodTest { - - private val context: Context by lazy { - ApplicationProvider.getApplicationContext() - } + private val context = ApplicationProvider.getApplicationContext() @get:Rule val activityScenarioRule: ActivityScenarioRule = activityScenarioRule() diff --git a/example/src/main/java/com/stripe/example/activity/CustomerSessionActivity.kt b/example/src/main/java/com/stripe/example/activity/CustomerSessionActivity.kt index 1694396220c..8210d07d9ae 100644 --- a/example/src/main/java/com/stripe/example/activity/CustomerSessionActivity.kt +++ b/example/src/main/java/com/stripe/example/activity/CustomerSessionActivity.kt @@ -40,7 +40,8 @@ class CustomerSessionActivity : AppCompatActivity() { } private fun launchWithCustomer() { - PaymentMethodsActivityStarter(this).startForResult() + PaymentMethodsActivityStarter(this) + .startForResult(PaymentMethodsActivityStarter.Args.Builder().build()) } override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { diff --git a/stripe/src/main/java/com/stripe/android/view/ActivityStarter.kt b/stripe/src/main/java/com/stripe/android/view/ActivityStarter.kt index aa4d00080af..c93a7f10bf7 100644 --- a/stripe/src/main/java/com/stripe/android/view/ActivityStarter.kt +++ b/stripe/src/main/java/com/stripe/android/view/ActivityStarter.kt @@ -26,6 +26,7 @@ abstract class ActivityStarter) -> Unit ) { activityScenarioFactory.create( - PaymentMethodsActivityStarter.Args.DEFAULT + PaymentMethodsActivityStarter.Args.Builder().build() ).use(callback) } diff --git a/stripe/src/test/java/com/stripe/android/StripePaymentAuthTest.kt b/stripe/src/test/java/com/stripe/android/StripePaymentAuthTest.kt index 5098131e9e5..e21123aab3f 100644 --- a/stripe/src/test/java/com/stripe/android/StripePaymentAuthTest.kt +++ b/stripe/src/test/java/com/stripe/android/StripePaymentAuthTest.kt @@ -22,10 +22,7 @@ import org.robolectric.RobolectricTestRunner @RunWith(RobolectricTestRunner::class) class StripePaymentAuthTest { - - private val context: Context by lazy { - ApplicationProvider.getApplicationContext() - } + private val context = ApplicationProvider.getApplicationContext() private val activity: Activity = mock() private val paymentController: PaymentController = mock() diff --git a/stripe/src/test/java/com/stripe/android/view/AddPaymentMethodViewModelTest.kt b/stripe/src/test/java/com/stripe/android/view/AddPaymentMethodViewModelTest.kt index 2e52816557d..e60c1894a49 100644 --- a/stripe/src/test/java/com/stripe/android/view/AddPaymentMethodViewModelTest.kt +++ b/stripe/src/test/java/com/stripe/android/view/AddPaymentMethodViewModelTest.kt @@ -26,9 +26,7 @@ import org.robolectric.RobolectricTestRunner @RunWith(RobolectricTestRunner::class) class AddPaymentMethodViewModelTest { - private val context: Context by lazy { - ApplicationProvider.getApplicationContext() - } + private val context = ApplicationProvider.getApplicationContext() private val customerSession: CustomerSession = mock() private val paymentMethodRetrievalCaptor: KArgumentCaptor = argumentCaptor() @@ -123,7 +121,7 @@ class AddPaymentMethodViewModelTest { return AddPaymentMethodViewModel( stripe, customerSession, - AddPaymentMethodActivityStarter.Args.DEFAULT, + AddPaymentMethodActivityStarter.Args.Builder().build(), translator ) } diff --git a/stripe/src/test/java/com/stripe/android/view/PaymentFlowActivityTest.kt b/stripe/src/test/java/com/stripe/android/view/PaymentFlowActivityTest.kt index 95f32fd81ed..01202f517a5 100644 --- a/stripe/src/test/java/com/stripe/android/view/PaymentFlowActivityTest.kt +++ b/stripe/src/test/java/com/stripe/android/view/PaymentFlowActivityTest.kt @@ -35,12 +35,8 @@ class PaymentFlowActivityTest { private val shippingInformationValidator: PaymentSessionConfig.ShippingInformationValidator = mock() private val shippingMethodsFactory: PaymentSessionConfig.ShippingMethodsFactory = mock() - private val context: Context by lazy { - ApplicationProvider.getApplicationContext() - } - private val activityScenarioFactory: ActivityScenarioFactory by lazy { - ActivityScenarioFactory(ApplicationProvider.getApplicationContext()) - } + private val context = ApplicationProvider.getApplicationContext() + private val activityScenarioFactory = ActivityScenarioFactory(context) @BeforeTest fun setup() { diff --git a/stripe/src/test/java/com/stripe/android/view/PaymentMethodsAdapterTest.kt b/stripe/src/test/java/com/stripe/android/view/PaymentMethodsAdapterTest.kt index ed8a4d9b826..08b210fdef8 100644 --- a/stripe/src/test/java/com/stripe/android/view/PaymentMethodsAdapterTest.kt +++ b/stripe/src/test/java/com/stripe/android/view/PaymentMethodsAdapterTest.kt @@ -29,9 +29,7 @@ class PaymentMethodsAdapterTest { private val paymentMethodsAdapter: PaymentMethodsAdapter = PaymentMethodsAdapter(ARGS) - private val context: Context by lazy { - ApplicationProvider.getApplicationContext() - } + private val context = ApplicationProvider.getApplicationContext() @BeforeTest fun setup() { diff --git a/stripe/src/test/java/com/stripe/android/view/ShippingInfoWidgetTest.kt b/stripe/src/test/java/com/stripe/android/view/ShippingInfoWidgetTest.kt index 35b9db635ec..95b2c0fa2e5 100644 --- a/stripe/src/test/java/com/stripe/android/view/ShippingInfoWidgetTest.kt +++ b/stripe/src/test/java/com/stripe/android/view/ShippingInfoWidgetTest.kt @@ -47,13 +47,8 @@ class ShippingInfoWidgetTest { private val ephemeralKeyProvider: EphemeralKeyProvider = mock() - private val context: Context by lazy { - ApplicationProvider.getApplicationContext() - } - - private val activityScenarioFactory: ActivityScenarioFactory by lazy { - ActivityScenarioFactory(context) - } + private val context = ApplicationProvider.getApplicationContext() + private val activityScenarioFactory = ActivityScenarioFactory(context) @BeforeTest fun setup() {