This file contains 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
public class ActivityTest extends Frament implements Wizzard { | |
@Override | |
public Validate getValidate() { | |
UserPasswordValidator userPasswordValidator = new UserPasswordValidator(user,password); | |
return userPasswordValidator(); | |
} | |
} |
This file contains 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
public class SampleUserCaseJob implements SampleUserCase { | |
private final UserCaseHandler userCaseHandler; | |
@Inject | |
public GetDiscoverDestinationUserCaseJob(UserCaseHandler userCaseHandler) { | |
this.userCaseHandler = userCaseHandler; | |
} | |
@UserCase public void executeObtainDestination() { |
This file contains 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
@Override | |
public int hashCode() { | |
return (isLenient() ? 1237 : 1231) + getFirstDayOfWeek() | |
+ getMinimalDaysInFirstWeek() + getTimeZone().hashCode(); | |
} |
This file contains 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
public class MainActivity extends BaseActivity implements SuperHeroesPresenter.View { | |
@Inject SuperHeroesPresenter presenter; | |
/* ... */ | |
} |
This file contains 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
@Module public class MainModule { | |
@Provides @Singleton public SuperHeroesRepository provideSuperHeroesRepository() { | |
return new SuperHeroesRepository(); | |
} | |
} |
This file contains 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
//MainActivity.java | |
public class MainActivity extends BaseActivity implements SuperHeroesPresenter.View { | |
@Inject SuperHeroesPresenter presenter; | |
/* ... */ | |
} | |
//MainModule.java |
This file contains 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
onView(withId(R.id.my_view)) // withId(R.id.my_view) is a ViewMatcher | |
.perform(click()) // click() is a ViewAction | |
.check(matches(isDisplayed())); // matches(isDisplayed()) is a ViewAssertion |
This file contains 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
onView(withId(R.id.my_view)) // withId(R.id.my_view) is a ViewMatcher | |
.perform(click()) // click() is a ViewAction | |
.check(matches(isDisplayed())); // matches(isDisplayed()) is a ViewAssertion |
This file contains 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 public void showsEmptyCaseIfThereAreNoSuperHeroes() { | |
givenThereAreNoSuperHeroes(); | |
startActivity(); | |
onView(withText("¯\\_(ツ)_/¯")).check(matches(isDisplayed())); | |
} |
This file contains 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 public void shouldShowAnErrorWhenTheEmailIsNotAnEmail() { | |
onView(withId(R.id.email)).perform(typeText("Not is an email"), closeSoftKeyboard()); | |
onView(withId(R.id.email_sign_in_button)).perform(click()); | |
onView(withId(R.id.tv_error)).check(matches(withText(R.string.error_invalid_email))); | |
} |
OlderNewer