TravelNotesPresenter implements TravelNotesContract.Presenter { @Override public void loadData(String key,int page) { view.showDialog(); APIServiceManager .getTravelNotesAPI() .getTravelNotesList(key, page + "") .compose(obj.bindToLifecycle()) .compose(RxSchedulersHelper.io_main()) .compose(SchedulersHelper.handleResult()) .doOnTerminate(() -> view.disDialog()) .subscribe(d -> obj.dataBinding(d), e -> obj.dataError(e)); } TravelNotesPresenter(TravelNotesContract.View view, TravelNotesActivity obj); @Override int refreshData(String key,int page,boolean isNote); @Override void loadData(String key,int page); @Override void loadData(String key,int page,int count); @Override void start(); @Override void close(); public TravelNotesActivity obj; }
@Test public void loadData() throws Exception { travelNotesPresenter.loadData("",0); }
@Test public void loadData1() throws Exception { travelNotesPresenter.loadData("",0,0); }