@Test public void testRenderFromModel() { DistrictListElement element = mRenderer.renderFromModel(mDistrict, new DistrictRenderer.RenderArgs(12, true)); assertDistrictItem(element, 12, 2015, true); }
@WorkerThread @Override public @Nullable DistrictListElement renderFromModel(District district, RenderArgs args) { return new DistrictListElement( district, args != null ? args.numEvents : 0, args != null && args.showMyTba); }
DistrictRenderer implements ModelRenderer<District, DistrictRenderer.RenderArgs> { @WorkerThread @Override public @Nullable DistrictListElement renderFromModel(District district, RenderArgs args) { return new DistrictListElement( district, args != null ? args.numEvents : 0, args != null && args.showMyTba); } }
DistrictRenderer implements ModelRenderer<District, DistrictRenderer.RenderArgs> { @WorkerThread @Override public @Nullable DistrictListElement renderFromModel(District district, RenderArgs args) { return new DistrictListElement( district, args != null ? args.numEvents : 0, args != null && args.showMyTba); } @Inject  DistrictRenderer(APICache datafeed); }
DistrictRenderer implements ModelRenderer<District, DistrictRenderer.RenderArgs> { @WorkerThread @Override public @Nullable DistrictListElement renderFromModel(District district, RenderArgs args) { return new DistrictListElement( district, args != null ? args.numEvents : 0, args != null && args.showMyTba); } @Inject  DistrictRenderer(APICache datafeed); @WorkerThread @Override @Nullable DistrictListElement renderFromKey(String key, ModelType type, RenderArgs args); @WorkerThread @Override @Nullable DistrictListElement renderFromModel(District district, RenderArgs args); }
DistrictRenderer implements ModelRenderer<District, DistrictRenderer.RenderArgs> { @WorkerThread @Override public @Nullable DistrictListElement renderFromModel(District district, RenderArgs args) { return new DistrictListElement( district, args != null ? args.numEvents : 0, args != null && args.showMyTba); } @Inject  DistrictRenderer(APICache datafeed); @WorkerThread @Override @Nullable DistrictListElement renderFromKey(String key, ModelType type, RenderArgs args); @WorkerThread @Override @Nullable DistrictListElement renderFromModel(District district, RenderArgs args);  }