예제 #1
0
        public void GetAgeDescription_EarlyTwenties()
        {
            var ranger      = new Models.AgeRanger(TheGroups);
            var description = ranger.GetAgeDescription(20);

            Assert.AreEqual("Early twenties", description, "should be Early twenties");
            description = ranger.GetAgeDescription(24);
            Assert.AreEqual("Early twenties", description, "should be Early twenties");
        }
예제 #2
0
        public void GetAgeDescription_Child()
        {
            var ranger      = new Models.AgeRanger(TheGroups);
            var description = ranger.GetAgeDescription(2);

            Assert.AreEqual("Child", description, "should be Child");
            description = ranger.GetAgeDescription(13);
            Assert.AreEqual("Child", description, "should be Child");
        }
예제 #3
0
        public void GetAgeDescription_Teenager()
        {
            var ranger      = new Models.AgeRanger(TheGroups);
            var description = ranger.GetAgeDescription(14);

            Assert.AreEqual("Teenager", description, "should be Teenager");
            description = ranger.GetAgeDescription(19);
            Assert.AreEqual("Teenager", description, "should be Teenager");
        }
예제 #4
0
        public void GetAgeDescription_KauriTree()
        {
            var ranger      = new Models.AgeRanger(TheGroups);
            var description = ranger.GetAgeDescription(4999);

            Assert.AreEqual("Kauri tree", description, "should be Kauri tree");
            description = ranger.GetAgeDescription(2147483647);
            Assert.AreEqual("Kauri tree", description, "should be Kauri tree");
        }
예제 #5
0
        public void GetAgeDescription_CrazyAncient()
        {
            var ranger      = new Models.AgeRanger(TheGroups);
            var description = ranger.GetAgeDescription(110);

            Assert.AreEqual("Crazy ancient", description, "should be Crazy ancient");
            description = ranger.GetAgeDescription(198);
            Assert.AreEqual("Crazy ancient", description, "should be Crazy ancient");
        }
예제 #6
0
        public void GetAgeDescription_Vampire()
        {
            var ranger      = new Models.AgeRanger(TheGroups);
            var description = ranger.GetAgeDescription(199);

            Assert.AreEqual("Vampire", description, "should be Vampire");
            description = ranger.GetAgeDescription(4998);
            Assert.AreEqual("Vampire", description, "should be Vampire");
        }
예제 #7
0
        public void GetAgeDescription_VeryOld()
        {
            var ranger      = new Models.AgeRanger(TheGroups);
            var description = ranger.GetAgeDescription(99);

            Assert.AreEqual("Very old", description, "should be Very old");
            description = ranger.GetAgeDescription(109);
            Assert.AreEqual("Very old", description, "should be Very old");
        }
예제 #8
0
        public void GetAgeDescription_Old()
        {
            var ranger      = new Models.AgeRanger(TheGroups);
            var description = ranger.GetAgeDescription(70);

            Assert.AreEqual("Old", description, "should be Old");
            description = ranger.GetAgeDescription(98);
            Assert.AreEqual("Old", description, "should be Old");
        }
예제 #9
0
        public void GetAgeDescription_KindaOld()
        {
            var ranger      = new Models.AgeRanger(TheGroups);
            var description = ranger.GetAgeDescription(50);

            Assert.AreEqual("Kinda old", description, "should be Kinda old");
            description = ranger.GetAgeDescription(69);
            Assert.AreEqual("Kinda old", description, "should be Kinda old");
        }
예제 #10
0
        public void GetAgeDescription_VeryAdult()
        {
            var ranger      = new Models.AgeRanger(TheGroups);
            var description = ranger.GetAgeDescription(30);

            Assert.AreEqual("Very adult", description, "should be Very adult");
            description = ranger.GetAgeDescription(49);
            Assert.AreEqual("Very adult", description, "should be Very adult");
        }
예제 #11
0
        public void GetAgeDescription_AlmostThirty()
        {
            var ranger      = new Models.AgeRanger(TheGroups);
            var description = ranger.GetAgeDescription(25);

            Assert.AreEqual("Almost thirty", description, "should be Almost thirty");
            description = ranger.GetAgeDescription(29);
            Assert.AreEqual("Almost thirty", description, "should be Almost thirty");
        }
예제 #12
0
        public void GetAgeDescription_InvalidAge()
        {
            var ranger      = new Models.AgeRanger(TheGroups);
            var description = ranger.GetAgeDescription(-1);

            Assert.AreEqual("unknown", description, "should be unknown");
        }