This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class HeaderContent( | |
val headerText: String, | |
val subHeaderText: String, | |
val buttonText: String, | |
val buttonEvent: (()->Unit), | |
val isButtonVisible: Boolean, | |
val barEvent: (()->Unit) | |
) | |
class HeaderComponent @JvmOverloads constructor( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout> | |
<FrameLayout> | |
<RelativeLayout> | |
<ConstraintLayout> | |
<View /> | |
<View /> | |
<View /> | |
<View /> | |
</ConstraintLayout> | |
</RelativeLayout> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun showMessage(context: Context, @StringRes val idRes: Int) { | |
Toast.makeText(context, idRes, Toast.SHORT_LENGHT).show() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun showMessage(context: Context, val idRes: Int) { | |
Toast.makeText(context, idRes, Toast.SHORT_LENGHT).show() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ResultProfileBinding binding; | |
@Override | |
public View onCreateView (LayoutInflater inflater, | |
ViewGroup container, | |
Bundle savedInstanceState) { | |
binding = ResultProfileBinding.inflate(inflater, container, false); | |
View view = binding.getRoot(); | |
return view; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val localRepository = mockk<LocalRepository>() | |
@Test | |
fun `user name - already exists a user name`() { | |
every { localRepository.userName() }.returns("Moro") | |
val viewModel = UserNameStepViewModel(localRepository) | |
val result = viewModel.userName | |
Truth.assertThat(result).isEqualTo("Moro") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
fun `user email - already exists a user email`() { | |
// arrange | |
every { localRepository.userEmail() }.returns("[email protected]") | |
val viewModel = UserEmailStepViewModel(localRepository) | |
// act | |
val result = viewModel.userEmail | |
// assert |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// string | |
Truth.assertThat(result).isEqualTo("my string") | |
// list | |
Truth.assertThat(result).isEmpty() | |
// custom object | |
Truth.assertThat(uiBase).isEqualTo( | |
UIBaseState.Error("Invalid e-mail") | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object ScreenRoutes { | |
const val ON_BOARDING_ROUTE = "Simplemath_Onboarding" | |
const val ON_BOARDING_WELCOME_NAVO_MESSAGE_ROUTE = "Simplemath_Onboarding_Welcome_Navo_Message" | |
const val ON_BOARDING_USER_NAME_STEP_ROUTE = "Simplemath_Onboarding_UserNameStep" | |
const val ON_BOARDING_USER_AGE_STEP_ROUTE = "Simplemath_Onboarding_UserAgeStep" | |
const val ON_BOARDING_USER_EMAIL_STEP_ROUTE = "Simplemath_Onboarding_UserEmailStep" | |
const val ON_BOARDING_WELCOME_USER_STEP_ROUTE = "Simplemath_Onboarding_WelcomeUserStep" | |
const val DASHBOARD_ROUTE = "Simplemath_Dashboard" |