use of com.karumi.rosie.sample.comics.view.viewmodel.ComicSeriesDetailsViewModel in project Rosie by Karumi.
the class ComicSeriesDetailsActivityTest method givenComicData.
private List<ComicSeriesDetailViewModel> givenComicData(ComicSeries comicSeries) {
ComicSeriesToComicSeriesDetailsViewModelMapper mapper = new ComicSeriesToComicSeriesDetailsViewModelMapper();
ComicSeriesDetailsViewModel comicSeriesDetailsViewModel = mapper.map(comicSeries);
return comicSeriesDetailsViewModel.getComicSeriesDetailViewModels();
}
use of com.karumi.rosie.sample.comics.view.viewmodel.ComicSeriesDetailsViewModel in project Rosie by Karumi.
the class ComicSeriesToComicSeriesDetailsViewModelMapper method map.
@Override
public ComicSeriesDetailsViewModel map(ComicSeries comicSeries) {
ComicSeriesDetailsViewModel comicSeriesDetailsViewModel = new ComicSeriesDetailsViewModel();
comicSeriesDetailsViewModel.setTitle(comicSeries.getName());
List<ComicSeriesDetailViewModel> comicSeriesDetailViewModels = new LinkedList<>();
comicSeriesDetailViewModels.add(mapComicSeriesToComicSeriesHeaderDetailViewModel(comicSeries));
comicSeriesDetailViewModels.addAll(mapComicsToComicViewModels(comicSeries.getComics()));
comicSeriesDetailsViewModel.setComicSeriesDetailViewModels(comicSeriesDetailViewModels);
return comicSeriesDetailsViewModel;
}
Aggregations