@Test public void checkTopListItem(){ String mMnemonic = "year rib clay employ boring icon vote shrug lab fluid loyal panda"; String[] worlds = mMnemonic.split(" "); VerificationMnemonicContract.DataEntity[] mTopList = new VerificationMnemonicContract.DataEntity[worlds.length]; presenter.setmTopList(mTopList); presenter.checkTopListItem(0); Mockito.verify(view).showTopList(Mockito.any()); }
@Override public void checkTopListItem(int index) { VerificationMnemonicContract.DataEntity dataEntity = mTopList[index]; if (dataEntity != null) { setBottomItemChecked(dataEntity.getMnemonic(), false); mTopList[index] = null; } getView().showTopList(mTopList); getView().showBottomList(mAllList); getView().setCompletedBtnEnable(enableBackup()); getView().setClearBtnEnable(enableClear()); }
VerificationMnemonicPresenter extends BasePresenter<VerificationMnemonicContract.View> implements VerificationMnemonicContract.Presenter { @Override public void checkTopListItem(int index) { VerificationMnemonicContract.DataEntity dataEntity = mTopList[index]; if (dataEntity != null) { setBottomItemChecked(dataEntity.getMnemonic(), false); mTopList[index] = null; } getView().showTopList(mTopList); getView().showBottomList(mAllList); getView().setCompletedBtnEnable(enableBackup()); getView().setClearBtnEnable(enableClear()); } }
VerificationMnemonicPresenter extends BasePresenter<VerificationMnemonicContract.View> implements VerificationMnemonicContract.Presenter { @Override public void checkTopListItem(int index) { VerificationMnemonicContract.DataEntity dataEntity = mTopList[index]; if (dataEntity != null) { setBottomItemChecked(dataEntity.getMnemonic(), false); mTopList[index] = null; } getView().showTopList(mTopList); getView().showBottomList(mAllList); getView().setCompletedBtnEnable(enableBackup()); getView().setClearBtnEnable(enableClear()); }  }
VerificationMnemonicPresenter extends BasePresenter<VerificationMnemonicContract.View> implements VerificationMnemonicContract.Presenter { @Override public void checkTopListItem(int index) { VerificationMnemonicContract.DataEntity dataEntity = mTopList[index]; if (dataEntity != null) { setBottomItemChecked(dataEntity.getMnemonic(), false); mTopList[index] = null; } getView().showTopList(mTopList); getView().showBottomList(mAllList); getView().setCompletedBtnEnable(enableBackup()); getView().setClearBtnEnable(enableClear()); }  VerificationMnemonicContract.DataEntity[] getmTopList(); void setmTopList(VerificationMnemonicContract.DataEntity[] mTopList); ArrayList<VerificationMnemonicContract.DataEntity> getmAllList(); void setmAllList(ArrayList<VerificationMnemonicContract.DataEntity> mAllList); @Override void init(); @Override void checkTopListItem(int index); @Override void checkBottomListItem(int index); @Override void emptyChecked(); @Override void submit(); VerificationMnemonicContract.DataEntity generateDataEntity(String mnemonic); }
VerificationMnemonicPresenter extends BasePresenter<VerificationMnemonicContract.View> implements VerificationMnemonicContract.Presenter { @Override public void checkTopListItem(int index) { VerificationMnemonicContract.DataEntity dataEntity = mTopList[index]; if (dataEntity != null) { setBottomItemChecked(dataEntity.getMnemonic(), false); mTopList[index] = null; } getView().showTopList(mTopList); getView().showBottomList(mAllList); getView().setCompletedBtnEnable(enableBackup()); getView().setClearBtnEnable(enableClear()); }  VerificationMnemonicContract.DataEntity[] getmTopList(); void setmTopList(VerificationMnemonicContract.DataEntity[] mTopList); ArrayList<VerificationMnemonicContract.DataEntity> getmAllList(); void setmAllList(ArrayList<VerificationMnemonicContract.DataEntity> mAllList); @Override void init(); @Override void checkTopListItem(int index); @Override void checkBottomListItem(int index); @Override void emptyChecked(); @Override void submit(); VerificationMnemonicContract.DataEntity generateDataEntity(String mnemonic);  }