コード例 #1
0
        public void AddScoreAtLeast0()
        {
            var model = new SpellingModel();

            model.score = 30;
            model.AddScore(-1);
            Assert.AreEqual(29, model.score);
            model.AddScore(-20);
            Assert.AreEqual(9, model.score);
            model.AddScore(-20);
            Assert.AreEqual(0, model.score);
            model.AddScore(-1);
            Assert.AreEqual(0, model.score);
        }