public void Get_course_completion_of_assessed_course_should_return_course_completion()
        {
            using (new TransactionScope())
            {
                // Given
                const int candidateId     = 252646;
                const int customisationId = 21452;
                courseContentTestHelper.UpdateIncludeCertification(customisationId, true);

                // When
                var result = courseCompletionService.GetCourseCompletion(candidateId, customisationId);

                // Then
                result.Should().BeEquivalentTo(new CourseCompletion(
                                                   customisationId,
                                                   "TNA v0.1",
                                                   "RiO Mersey Care & NWBH",
                                                   DateTime.Parse("2017-07-26 07:56:15.273"),
                                                   null,
                                                   1,
                                                   true,
                                                   80,
                                                   85,
                                                   100,
                                                   22,
                                                   1,
                                                   425 / 31.0,
                                                   9,
                                                   13
                                                   ));
            }
        }
Пример #2
0
        public void Get_course_content_with_include_certification_should_return_include_certification()
        {
            // Given
            const int candidateId     = 22044;
            const int customisationId = 4169;

            using (new TransactionScope())
            {
                // Then
                courseContentTestHelper.UpdateIncludeCertification(customisationId, true);
                var result         = courseContentService.GetCourseContent(candidateId, customisationId);
                var expectedCourse = new CourseContent(
                    4169,
                    "Level 2 - Microsoft Excel 2010",
                    null,
                    "MOS Excel 2010 CORE",
                    349,
                    "Northumbria Healthcare NHS Foundation Trust",
                    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    true,
                    null,
                    0,
                    true,
                    85,
                    90,
                    0,
                    null,
                    "",
                    false
                    );
                expectedCourse.Sections.AddRange(
                    new[]
                {
                    new CourseSection("Viewing workbooks", 112, true, 12.5, 0),
                    new CourseSection("Manipulating worksheets", 113, true, 20, 0),
                    new CourseSection("Manipulating information", 114, true, 25, 0),
                    new CourseSection("Using formulas", 115, true, 100 / 3.0, 0),
                    new CourseSection("Using functions", 116, true, 400 / 7.0, 0),
                    new CourseSection("Managing formulas and functions", 117, true, 0, 0),
                    new CourseSection("Working with data", 118, true, 0, 0),
                    new CourseSection("Formatting cells and worksheets", 119, true, 0, 0),
                    new CourseSection("Formatting numbers", 120, true, 0, 0),
                    new CourseSection("Working with charts", 121, true, 0, 0),
                    new CourseSection("Working with illustrations", 122, true, 0, 0),
                    new CourseSection("Collaborating with others", 123, true, 0, 0),
                    new CourseSection("Preparing to print", 124, true, 0, 0)
                }
                    );
                result.Should().BeEquivalentTo(expectedCourse);
            }
        }