Search in sources :

Example 21 with ComicSeries

use of com.karumi.rosie.sample.comics.domain.model.ComicSeries in project Rosie by Karumi.

the class ComicSeriesDetailsActivityTest method shouldShowComicSeriesDetailWhenComicSeriesIsLoaded.

@Test
public void shouldShowComicSeriesDetailWhenComicSeriesIsLoaded() throws Exception {
    ComicSeries comicSeries = givenValidComicSeries();
    startActivity();
    onView(withId(R.id.tv_toolbar_title)).check(matches(withText(comicSeries.getName())));
    onView(withId(R.id.tv_description)).check(matches(withText(comicSeries.getDescription())));
}
Also used : ComicSeries(com.karumi.rosie.sample.comics.domain.model.ComicSeries) InjectedInstrumentationTest(com.karumi.rosie.sample.InjectedInstrumentationTest) Test(org.junit.Test)

Example 22 with ComicSeries

use of com.karumi.rosie.sample.comics.domain.model.ComicSeries in project Rosie by Karumi.

the class ComicSeriesFakeDataSource method getGuardiansOfInfinity.

@NonNull
private ComicSeries getGuardiansOfInfinity() {
    ComicSeries guardiansOfInfinity = new ComicSeries();
    guardiansOfInfinity.setKey(GUARDIANS_OF_INFINITY_KEY);
    guardiansOfInfinity.setName("Guardians of Infinity # 2");
    guardiansOfInfinity.setCoverUrl("http://i.annihil.us/u/prod/marvel/i/mg/e/70/5655d14851998/detail.jpg");
    guardiansOfInfinity.setDescription("WHO ARE THE GUARDIANS 1000?! Defending the galaxy is a good gig, but Drax isn’t thrilled" + " with the combat hours (not enough of them) and Rocket isn’t thrilled with the" + " compensation (not enough of it). They’re off on an adventure to supplement both," + " and Groot is happy to come along. But instead of the perks they want, they’re about" + " to get more trouble than they can handle. Good thing the Guardians 3000 are on hand" + " to help! But what about…THE GUARDIANS 1000??!! Also in this issue, Latour and" + " Cheung tell a one-off story of Ben Grimm and Rocket Raccoon, stuck on a planet" + " where culture is based on Earth-style professional wrestling…but the stakes are" + " life and death! THIS AIN’T KAYFABE, BROTHER! ");
    guardiansOfInfinity.setReleaseYear(2015);
    guardiansOfInfinity.setRating("All ages");
    guardiansOfInfinity.setComics(getComics(guardiansOfInfinity.getName()));
    return guardiansOfInfinity;
}
Also used : ComicSeries(com.karumi.rosie.sample.comics.domain.model.ComicSeries) NonNull(android.support.annotation.NonNull)

Aggregations

ComicSeries (com.karumi.rosie.sample.comics.domain.model.ComicSeries)22 NonNull (android.support.annotation.NonNull)7 PaginatedCollection (com.karumi.rosie.repository.PaginatedCollection)3 InjectedInstrumentationTest (com.karumi.rosie.sample.InjectedInstrumentationTest)3 Comic (com.karumi.rosie.sample.comics.domain.model.Comic)3 Test (org.junit.Test)3 Page (com.karumi.rosie.repository.datasource.paginated.Page)2 ArrayList (java.util.ArrayList)2 LinkedList (java.util.LinkedList)2 Activity (android.app.Activity)1 ViewPager (android.support.v4.view.ViewPager)1 LargeTest (android.test.suitebuilder.annotation.LargeTest)1 SeriesCollectionDto (com.karumi.marvelapiclient.model.SeriesCollectionDto)1 SeriesDto (com.karumi.marvelapiclient.model.SeriesDto)1 RosieUseCase (com.karumi.rosie.domain.usecase.RosieUseCase)1 UseCase (com.karumi.rosie.domain.usecase.annotation.UseCase)1 CharacterDetailsActivity (com.karumi.rosie.sample.characters.view.activity.CharacterDetailsActivity)1 ComicSeriesDetailsActivity (com.karumi.rosie.sample.comics.view.activity.ComicSeriesDetailsActivity)1 ComicSeriesDetailViewModel (com.karumi.rosie.sample.comics.view.viewmodel.ComicSeriesDetailViewModel)1 ComicSeriesViewModel (com.karumi.rosie.sample.comics.view.viewmodel.ComicSeriesViewModel)1