Example #1
0
        public void CategoryForOutOfBoardPlace(Int32 place)
        {
            var deck = new QuestionDeck();

            var category = deck.CurrentCategoryPlace(place);

            Assert.Equal("Rock", category);
        }
Example #2
0
        public void CategoryForBoardPlace(Int32 place, String expected)
        {
            var deck = new QuestionDeck();

            var category = deck.CurrentCategoryPlace(place);

            Assert.Equal(expected, category);
        }
Example #3
0
        public void AskMultipleQuestionForSameCategory()
        {
            var deck = new QuestionDeck();

            deck.FillQuestions();
            Assert.Equal("Pop Question 0", deck.AskCategoryQuestion("Pop"));
            Assert.Equal("Pop Question 1", deck.AskCategoryQuestion("Pop"));
            Assert.Equal("Pop Question 2", deck.AskCategoryQuestion("Pop"));
        }
Example #4
0
        public void QuestionForUnknownCategory()
        {
            var deck = new QuestionDeck();

            deck.FillQuestions();
            var question = deck.AskCategoryQuestion("unknown");

            Assert.Null(question);
        }
Example #5
0
        public void FirstQuestionForOneCategory(String category)
        {
            var deck = new QuestionDeck();

            deck.FillQuestions();
            var question = deck.AskCategoryQuestion(category);

            Assert.Equal(category + " Question 0", question);
        }
Example #6
0
        public void AskMultipleQuestionsForMixedCategories()
        {
            var deck = new QuestionDeck();

            deck.FillQuestions();
            Assert.Equal("Pop Question 0", deck.AskCategoryQuestion("Pop"));
            Assert.Equal("Sports Question 0", deck.AskCategoryQuestion("Sports"));
            Assert.Equal("Pop Question 1", deck.AskCategoryQuestion("Pop"));
            Assert.Equal("Rock Question 0", deck.AskCategoryQuestion("Rock"));
            Assert.Equal("Sports Question 1", deck.AskCategoryQuestion("Sports"));
        }
Example #7
0
        public Game()
        {
            questionDeck = new QuestionDeck();

            questionDeck.FillQuestions();
        }