private void Start() { _presenter = TriviaGamePresenterBuilder.BuildTriviaGamePresenter(this); foreach (var answerView in _answers) { answerView.Initialize(OnAnswerSelected); } }
public void SetUp() { _view = Substitute.For <TriviaGameView>(); _presenter = new TriviaGamePresenter(_view, new Question[] { _firstQuestion, _secondQuestion, _thirdQuestion }); _firstQuestion.IsRightAnswer("ok").Returns(true); _firstQuestion.IsRightAnswer("nope").Returns(false); _secondQuestion.IsRightAnswer("ok").Returns(true); _secondQuestion.IsRightAnswer("nope").Returns(false); _thirdQuestion.IsRightAnswer("ok").Returns(true); _thirdQuestion.IsRightAnswer("nope").Returns(false); }