@Test public void getPreviousAnswerTest() { questionPresenter.getQuestion(); verify(view).setPreviousAnswer(anyString()); }
@Override public void getQuestion() { List<QuestionsContract> questions = this.listOfQuestions.getQuestion(); QuestionsContract questionsContract = questions.get(position); int question = questionsContract.getQuestion(); int color = questionsContract.getColor(); int drawable = questionsContract.getIcon(); view.showQuestion(question, poi.getName(), color, drawable); String key = questionsContract.getTag(); String answer = poi.getTag(key); if (answer != null) { view.setPreviousAnswer(answer); } else { view.setPreviousAnswer(""); } }
QuestionPresenter implements QuestionFragmentContract.Presenter { @Override public void getQuestion() { List<QuestionsContract> questions = this.listOfQuestions.getQuestion(); QuestionsContract questionsContract = questions.get(position); int question = questionsContract.getQuestion(); int color = questionsContract.getColor(); int drawable = questionsContract.getIcon(); view.showQuestion(question, poi.getName(), color, drawable); String key = questionsContract.getTag(); String answer = poi.getTag(key); if (answer != null) { view.setPreviousAnswer(answer); } else { view.setPreviousAnswer(""); } } }
QuestionPresenter implements QuestionFragmentContract.Presenter { @Override public void getQuestion() { List<QuestionsContract> questions = this.listOfQuestions.getQuestion(); QuestionsContract questionsContract = questions.get(position); int question = questionsContract.getQuestion(); int color = questionsContract.getColor(); int drawable = questionsContract.getIcon(); view.showQuestion(question, poi.getName(), color, drawable); String key = questionsContract.getTag(); String answer = poi.getTag(key); if (answer != null) { view.setPreviousAnswer(answer); } else { view.setPreviousAnswer(""); } } QuestionPresenter(QuestionFragmentContract.View view, int position, SourceContract.Preferences preferences); }
QuestionPresenter implements QuestionFragmentContract.Presenter { @Override public void getQuestion() { List<QuestionsContract> questions = this.listOfQuestions.getQuestion(); QuestionsContract questionsContract = questions.get(position); int question = questionsContract.getQuestion(); int color = questionsContract.getColor(); int drawable = questionsContract.getIcon(); view.showQuestion(question, poi.getName(), color, drawable); String key = questionsContract.getTag(); String answer = poi.getTag(key); if (answer != null) { view.setPreviousAnswer(answer); } else { view.setPreviousAnswer(""); } } QuestionPresenter(QuestionFragmentContract.View view, int position, SourceContract.Preferences preferences); @Override void getQuestion(); @Override void onAnswerSelected(int id); }
QuestionPresenter implements QuestionFragmentContract.Presenter { @Override public void getQuestion() { List<QuestionsContract> questions = this.listOfQuestions.getQuestion(); QuestionsContract questionsContract = questions.get(position); int question = questionsContract.getQuestion(); int color = questionsContract.getColor(); int drawable = questionsContract.getIcon(); view.showQuestion(question, poi.getName(), color, drawable); String key = questionsContract.getTag(); String answer = poi.getTag(key); if (answer != null) { view.setPreviousAnswer(answer); } else { view.setPreviousAnswer(""); } } QuestionPresenter(QuestionFragmentContract.View view, int position, SourceContract.Preferences preferences); @Override void getQuestion(); @Override void onAnswerSelected(int id);  }