Пример #1
0
        public void if_the_person_exists_in_tree_the_result_should_be_january()
        {
            var tree   = FamilyTreeGenerator.Make();
            var result = new Solution().GetBirthMonth(tree, "Joe");

            result.ShouldEqual("January");
        }
Пример #2
0
        public void if__the_person_exists_at_the_top_tree_the_result_should_be_may()
        {
            var tree   = FamilyTreeGenerator.Make();
            var result = new Solution().GetBirthMonth(tree, "Ted");

            result.ShouldEqual("May");
        }
Пример #3
0
        public void if_the_person_does_not_exist_in_the_tree_the_result_should_be_empty()
        {
            var tree   = FamilyTreeGenerator.Make();
            var result = new Solution().GetBirthMonth(tree, "Jeebus");

            result.ShouldEqual("");
        }
Пример #4
0
        public void if_the_person_exists_in_tree_the_result_should_be_their_birthday(int index)
        {
            var tree   = FamilyTreeGenerator.Make();
            var result = new Solution().GetBirthMonth(tree, "Name" + index);

            result.ShouldEqual(DateTime.Now.AddDays(index - 1).ToString("MMMM"));
        }