Пример #1
0
        public void SelectJobProfileCoursesMaxReturnedTest(int courseCount)
        {
            //Arrange
            var coursesInput      = GeneratedNewCourses(courseCount);
            var manageCoursesFake = new CourseOpportunityBuilder();

            //Act
            var results = manageCoursesFake.SelectCoursesForJobProfile(coursesInput);

            //Assert
            results.Count().Should().BeLessOrEqualTo(2);
        }
Пример #2
0
        public void SelectJobProfileCoursesDifferentProviderTest()
        {
            //Arrange
            var coursesInput      = GenerateDummyCourses();
            var manageCoursesFake = new CourseOpportunityBuilder();

            //Act
            var results = manageCoursesFake.SelectCoursesForJobProfile(coursesInput);

            //Assert
            results.Select(course => course.ProviderName).Distinct().Count().Should().BeGreaterThan(1);
            results.First().Should().BeEquivalentTo(coursesInput.First());
            results.Last().Should().BeEquivalentTo(coursesInput.First(i => i.ProviderName.Equals("Provider 2")));
        }
Пример #3
0
        public void SelectJobProfileCoursesSameProviderTest(int courseCount)
        {
            //Arrange
            var coursesInput      = GeneratedNewCourses(courseCount);
            var manageCoursesFake = new CourseOpportunityBuilder();

            //Act
            var results = manageCoursesFake.SelectCoursesForJobProfile(coursesInput);

            //Assert
            results.Count().Should().BeLessOrEqualTo(2);
            results.Select(course => course.ProviderName).Distinct().Count().Should().Be(1);
            results.First().Should().BeEquivalentTo(coursesInput.First());
            results.Last().Should().BeEquivalentTo(coursesInput.Skip(1).First());
        }