Exemple #1
0
        public void EducationCriteriaNull()
        {
            var educationCriteria             = new EducationCriteria();
            var actual                        = educationCriteria.MeetCriteria(null);
            ICollection <Experience> expected = new List <Experience>();

            Assert.IsTrue(expected.SequenceEqual(actual));
        }
Exemple #2
0
        public void EducationCriteriaWorksWithEmptyList()
        {
            ICollection <Experience> emptyList = new List <Experience>();
            var educationCriteria             = new EducationCriteria();
            var actual                        = educationCriteria.MeetCriteria(emptyList);
            ICollection <Experience> expected = new List <Experience>();

            Assert.IsTrue(expected.SequenceEqual(actual));
        }
Exemple #3
0
        public List <GroupedExperienceAndCategory> GetEducations()
        {
            var educationCriteria      = new EducationCriteria();
            var orderByEndDateCriteria = new OrderByEndDateCriteria();
            var bothCriteria           = new AndCriteria(educationCriteria, orderByEndDateCriteria);
            var listOfEducations       = bothCriteria.MeetCriteria(Experience);

            var listofGroupedExperienceAndCategories = new List <GroupedExperienceAndCategory>()
            {
                new GroupedExperienceAndCategory("Uddannelse", listOfEducations.ToList())
            };

            return(listofGroupedExperienceAndCategories);
        }
Exemple #4
0
        public void EducationCriteriaWorksWithOneItemNotEducation()
        {
            ICollection <Experience> listWithOneItem = new List <Experience>();
            var educationExperience = new Experience("test",
                                                     "test",
                                                     new System.DateTime(),
                                                     new System.DateTime());

            educationExperience.Category          = new ExperienceCategory();
            educationExperience.Category.Category = "anything other than Uddannelse";
            listWithOneItem.Add(educationExperience);

            var educationCriteria             = new EducationCriteria();
            var actual                        = educationCriteria.MeetCriteria(listWithOneItem);
            ICollection <Experience> expected = new List <Experience>();

            Assert.IsTrue(expected.SequenceEqual(actual));
        }