For #19653 - Address 19643 PR comments

Rename handleAddCreditCard to handleAddCreditCardClicked
Rename onClickAddCreditCard to onAddCreditCardClick
Format layout_add_credit_card.xml
upstream-sync
Ionut Cristian Bedregeanu 3 years ago committed by Mugurell
parent 272e631b62
commit ac71b47c61

@ -23,9 +23,9 @@ interface CreditCardsManagementController {
fun handleCreditCardClicked(creditCard: CreditCard) fun handleCreditCardClicked(creditCard: CreditCard)
/** /**
* @see [CreditCardsManagementInteractor.onClickAddCreditCard] * @see [CreditCardsManagementInteractor.onAddCreditCardClick]
*/ */
fun handleAddCreditCard() fun handleAddCreditCardClicked()
} }
/** /**
@ -39,7 +39,7 @@ class DefaultCreditCardsManagementController(
navigateToCreditCardEditor(creditCard) navigateToCreditCardEditor(creditCard)
} }
override fun handleAddCreditCard() { override fun handleAddCreditCardClicked() {
navigateToCreditCardEditor() navigateToCreditCardEditor()
} }

@ -24,7 +24,7 @@ interface CreditCardsManagementInteractor {
* Navigates to the credit card editor to add a new credit card. Called when a user * Navigates to the credit card editor to add a new credit card. Called when a user
* taps on 'Add credit card' button. * taps on 'Add credit card' button.
*/ */
fun onClickAddCreditCard() fun onAddCreditCardClick()
} }
/** /**
@ -41,7 +41,7 @@ class DefaultCreditCardsManagementInteractor(
controller.handleCreditCardClicked(creditCard) controller.handleCreditCardClicked(creditCard)
} }
override fun onClickAddCreditCard() { override fun onAddCreditCardClick() {
controller.handleAddCreditCard() controller.handleAddCreditCardClicked()
} }
} }

@ -32,7 +32,7 @@ class CreditCardsManagementView(
layoutManager = LinearLayoutManager(containerView.context) layoutManager = LinearLayoutManager(containerView.context)
} }
add_credit_card_button.setOnClickListener { interactor.onClickAddCreditCard() } add_credit_card_button.setOnClickListener { interactor.onAddCreditCardClick() }
} }
/** /**

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public <?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this - License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout

@ -64,7 +64,7 @@ class DefaultCreditCardsManagementControllerTest {
@Test @Test
fun handleAddCreditCardClicked() { fun handleAddCreditCardClicked() {
controller.handleAddCreditCard() controller.handleAddCreditCardClicked()
verify { verify {
navController.navigate( navController.navigate(

@ -32,7 +32,7 @@ class DefaultCreditCardsManagementInteractorTest {
@Test @Test
fun onClickAddCreditCard() { fun onClickAddCreditCard() {
interactor.onClickAddCreditCard() interactor.onAddCreditCardClick()
verify { controller.handleAddCreditCard() } verify { controller.handleAddCreditCardClicked() }
} }
} }

Loading…
Cancel
Save