Exemplo n.º 1
0
        UpdateLearningPathwayDefaultsForCourse_correctly_updates_learning_pathway_defaults_without_auto_refresh()
        {
            using var transaction = new TransactionScope();
            try
            {
                // When
                courseDataService.UpdateLearningPathwayDefaultsForCourse(1, 6, 12, true, false, 0, 0, false);
                var courseDetails = courseDataService.GetCourseDetailsFilteredByCategory(
                    1,
                    2,
                    null
                    );

                // Then
                using (new AssertionScope())
                {
                    courseDetails !.CompleteWithinMonths.Should().Be(6);
                    courseDetails.ValidityMonths.Should().Be(12);
                    courseDetails.Mandatory.Should().Be(true);
                    courseDetails.AutoRefresh.Should().Be(false);
                    courseDetails.RefreshToCustomisationId.Should().Be(0);
                    courseDetails.AutoRefreshMonths.Should().Be(0);
                    courseDetails.ApplyLpDefaultsToSelfEnrol.Should().Be(false);
                }
            }
            finally
            {
                transaction.Dispose();
            }
        }