Exemple #1
0
        public void GetCoursesAvailableToCentreByCategory_returns_expected_values()
        {
            // Given
            const int centreId   = 101;
            int?      categoryId = null;

            // When
            var result = courseDataService.GetCoursesAvailableToCentreByCategory(centreId, categoryId).ToList();

            // Then
            var expectedFirstCourse = new CourseAssessmentDetails
            {
                CustomisationId   = 100,
                CentreId          = 101,
                ApplicationId     = 1,
                ApplicationName   = "Entry Level - Win XP, Office 2003/07 OLD",
                CustomisationName = "Standard",
                Active            = false,
                CategoryName      = "Undefined",
                CourseTopic       = "Undefined",
                HasDiagnostic     = false,
                HasLearning       = true,
                IsAssessed        = false,
            };

            result.Should().HaveCount(259);
            result.First().Should().BeEquivalentTo(expectedFirstCourse);
        }