@Test public void emptyChecked(){ ArrayList<VerificationMnemonicContract.DataEntity> mAllList = new ArrayList<>(); 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); for (String world : worlds) { VerificationMnemonicContract.DataEntity dataEntity = presenter.generateDataEntity(world); mAllList.add(dataEntity); } presenter.setmAllList(mAllList); presenter.emptyChecked(); Mockito.verify(view).showBottomList(Mockito.any()); }
@Override public void emptyChecked() { for (VerificationMnemonicContract.DataEntity dataEntity : mAllList) { dataEntity.setChecked(false); } for (int i = 0; i < mTopList.length; i++) { mTopList[i] = null; } getView().showTopList(mTopList); getView().showBottomList(mAllList); getView().setCompletedBtnEnable(enableBackup()); getView().setClearBtnEnable(enableClear()); }
VerificationMnemonicPresenter extends BasePresenter<VerificationMnemonicContract.View> implements VerificationMnemonicContract.Presenter { @Override public void emptyChecked() { for (VerificationMnemonicContract.DataEntity dataEntity : mAllList) { dataEntity.setChecked(false); } for (int i = 0; i < mTopList.length; i++) { mTopList[i] = null; } getView().showTopList(mTopList); getView().showBottomList(mAllList); getView().setCompletedBtnEnable(enableBackup()); getView().setClearBtnEnable(enableClear()); } }
VerificationMnemonicPresenter extends BasePresenter<VerificationMnemonicContract.View> implements VerificationMnemonicContract.Presenter { @Override public void emptyChecked() { for (VerificationMnemonicContract.DataEntity dataEntity : mAllList) { dataEntity.setChecked(false); } for (int i = 0; i < mTopList.length; i++) { mTopList[i] = null; } getView().showTopList(mTopList); getView().showBottomList(mAllList); getView().setCompletedBtnEnable(enableBackup()); getView().setClearBtnEnable(enableClear()); }  }
VerificationMnemonicPresenter extends BasePresenter<VerificationMnemonicContract.View> implements VerificationMnemonicContract.Presenter { @Override public void emptyChecked() { for (VerificationMnemonicContract.DataEntity dataEntity : mAllList) { dataEntity.setChecked(false); } for (int i = 0; i < mTopList.length; i++) { mTopList[i] = 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 emptyChecked() { for (VerificationMnemonicContract.DataEntity dataEntity : mAllList) { dataEntity.setChecked(false); } for (int i = 0; i < mTopList.length; i++) { mTopList[i] = 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);  }