Example #1
0
        public void SetQuestionAmount_WithIncorrectValue_DoesntChangeState()
        {
            QuizAPI api = new QuizAPI();

            api.SetQuestionAmount(-5);
            Assert.AreEqual(10, api.GetQuestionAmount());
        }
Example #2
0
        public void SetQuestionAmount_ChangesState()
        {
            QuizAPI api = new QuizAPI();

            api.SetQuestionAmount(15);
            Assert.AreEqual(15, api.GetQuestionAmount());
        }
Example #3
0
        public void DefaultSettingsAfterInit()
        {
            QuizAPI api = new QuizAPI();

            Assert.AreEqual(10, api.GetQuestionAmount());
            Assert.AreEqual(0, api.GetCategory());
            Assert.AreEqual(QuizAPI.Difficulty.ANY, api.GetDifficulty());
        }