@Test public void setPasswordErrorIfEmpty() { viewModel.username.set(USERNAME); viewModel.password.set(null); viewModel.url.set(URL); viewModel.onLoginClick(null); assertThat(viewModel.passwordError.get()).isEqualTo(ERROR_PASSWORD); }
void onLoginClick(@Nullable FABProgressCircle fabCircle) { if (!isSiteValid()) { return; } if (fabCircle != null) { fabCircle.show(); } triggerLogin(); }
LoginViewModel extends ViewModel { void onLoginClick(@Nullable FABProgressCircle fabCircle) { if (!isSiteValid()) { return; } if (fabCircle != null) { fabCircle.show(); } triggerLogin(); } }
LoginViewModel extends ViewModel { void onLoginClick(@Nullable FABProgressCircle fabCircle) { if (!isSiteValid()) { return; } if (fabCircle != null) { fabCircle.show(); } triggerLogin(); } LoginViewModel(UserManager userManager, RestUserRepository userRepository, Resources resources); }
LoginViewModel extends ViewModel { void onLoginClick(@Nullable FABProgressCircle fabCircle) { if (!isSiteValid()) { return; } if (fabCircle != null) { fabCircle.show(); } triggerLogin(); } LoginViewModel(UserManager userManager, RestUserRepository userRepository, Resources resources); boolean isGuest(); }
LoginViewModel extends ViewModel { void onLoginClick(@Nullable FABProgressCircle fabCircle) { if (!isSiteValid()) { return; } if (fabCircle != null) { fabCircle.show(); } triggerLogin(); } LoginViewModel(UserManager userManager, RestUserRepository userRepository, Resources resources); boolean isGuest(); public ObservableField<String> url; public ObservableField<String> urlError; public ObservableField<String> username; public ObservableField<String> usernameError; public ObservableField<String> password; public ObservableField<String> passwordError; }