public void TestWhenCreatedThenLoadQuestionCommandContainsCorrectGroupId()
        {
            //Assign
            QuestionGroup group = new QuestionGroup(10);

            //Act
            QuestionGroupViewModel viewModel = new QuestionGroupViewModel(group);

            //Assert
            Assert.True(((LoadQuestionCommand)viewModel.LoadQuestionCommand).GroupId == group.Id);
        }
        public void TestWhenAskLoadQuestionThatDonotExistsThenThrowArgumentOutOfRangeException()
        {
            //Assign
            QuestionGroupViewModel viewModel = new QuestionGroupViewModel(new QuestionGroup());

            Action action = () =>
            {
                //Act
                viewModel.LoadQuestionCommand.Execute(30);
            };

            //Assert
            Assert.Throws<ArgumentOutOfRangeException>(action);
        }
        public void TestWhenLoadQuestionThenQuestionMarkAsAnswered()
        {
            //Assign
            QuestionGroupViewModel viewModel = new QuestionGroupViewModel(new QuestionGroup(10, new List<Question>
            {
                new Question
                {
                    Cost = 30
                }
            }));

            //Act
            viewModel.LoadQuestionCommand.Execute(viewModel.Questions.First().Model.Cost);

            //Assert
            Assert.True(viewModel.Questions.First().IsAnswered);
        }