@Test public void testNullRenderFromKey() { when(mDatafeed.fetchEvent(EVENT_KEY)).thenReturn(Observable.just(null)); EventListElement element = mRenderer.renderFromKey(EVENT_KEY, ModelType.EVENT, null); assertNull(element); }
@WorkerThread @Override public @Nullable EventListElement renderFromKey(String key, ModelType type, Boolean args) { Event event = mDatafeed.fetchEvent(key).toBlocking().first(); if (event == null) { return null; } return renderFromModel(event, false); }
EventRenderer implements ModelRenderer<Event, Boolean> { @WorkerThread @Override public @Nullable EventListElement renderFromKey(String key, ModelType type, Boolean args) { Event event = mDatafeed.fetchEvent(key).toBlocking().first(); if (event == null) { return null; } return renderFromModel(event, false); } }
EventRenderer implements ModelRenderer<Event, Boolean> { @WorkerThread @Override public @Nullable EventListElement renderFromKey(String key, ModelType type, Boolean args) { Event event = mDatafeed.fetchEvent(key).toBlocking().first(); if (event == null) { return null; } return renderFromModel(event, false); } @Inject  EventRenderer(APICache datafeed); }
EventRenderer implements ModelRenderer<Event, Boolean> { @WorkerThread @Override public @Nullable EventListElement renderFromKey(String key, ModelType type, Boolean args) { Event event = mDatafeed.fetchEvent(key).toBlocking().first(); if (event == null) { return null; } return renderFromModel(event, false); } @Inject  EventRenderer(APICache datafeed); @WorkerThread @Override @Nullable EventListElement renderFromKey(String key, ModelType type, Boolean args); @WorkerThread @Override @Nullable EventListElement renderFromModel(Event event, Boolean showMyTbaSettings); @WorkerThread List<WebcastListElement> renderWebcasts(Event event); @WorkerThread void renderAlliances(List<EventAlliance> alliances, List<ListItem> destList); }
EventRenderer implements ModelRenderer<Event, Boolean> { @WorkerThread @Override public @Nullable EventListElement renderFromKey(String key, ModelType type, Boolean args) { Event event = mDatafeed.fetchEvent(key).toBlocking().first(); if (event == null) { return null; } return renderFromModel(event, false); } @Inject  EventRenderer(APICache datafeed); @WorkerThread @Override @Nullable EventListElement renderFromKey(String key, ModelType type, Boolean args); @WorkerThread @Override @Nullable EventListElement renderFromModel(Event event, Boolean showMyTbaSettings); @WorkerThread List<WebcastListElement> renderWebcasts(Event event); @WorkerThread void renderAlliances(List<EventAlliance> alliances, List<ListItem> destList);  }