use of org.fossasia.openevent.app.data.models.Faq in project open-event-orga-app by fossasia.
the class FaqListPresenterTest method testProgressbarOnSwipeRefreshNoItem.
@Test
public void testProgressbarOnSwipeRefreshNoItem() {
List<Faq> emptyList = new ArrayList<>();
when(faqRepository.getFaqs(ID, true)).thenReturn(Observable.fromIterable(emptyList));
faqListPresenter.loadFaqs(true);
InOrder inOrder = Mockito.inOrder(faqListView);
inOrder.verify(faqListView).showProgress(true);
inOrder.verify(faqListView).onRefreshComplete(true);
inOrder.verify(faqListView).showProgress(false);
}
use of org.fossasia.openevent.app.data.models.Faq in project open-event-orga-app by fossasia.
the class EventDelegate method getEventFaqs.
@Override
@JsonIgnore
public List<Faq> getEventFaqs() {
List<Faq> faqs = event.getFaqs();
if (faqs != null && !faqs.isEmpty()) {
for (Faq faq : faqs) faq.setEvent(event);
return faqs;
}
event.setFaqs(SQLite.select().from(Faq.class).where(Faq_Table.event_id.eq(event.getId())).queryList());
return faqs;
}
Aggregations