public void EducationCriteriaNull() { var educationCriteria = new EducationCriteria(); var actual = educationCriteria.MeetCriteria(null); ICollection <Experience> expected = new List <Experience>(); Assert.IsTrue(expected.SequenceEqual(actual)); }
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)); }
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); }
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)); }