public void UpdateAdminFieldForCourse_calls_data_service()
        {
            // Given
            A.CallTo(() => courseAdminFieldsDataService.UpdateAdminFieldForCourse(1, 1, null)).DoesNothing();

            // When
            courseAdminFieldsService.UpdateAdminFieldForCourse(1, 1, null);

            // Then
            A.CallTo(() => courseAdminFieldsDataService.UpdateAdminFieldForCourse(1, 1, null)).MustHaveHappened();
        }
Exemple #2
0
        public void UpdateAdminFieldForCourse_correctly_updates_custom_prompt()
        {
            using var transaction = new TransactionScope();
            try
            {
                // Given
                const string?options = "options";

                // When
                courseAdminFieldsDataService.UpdateAdminFieldForCourse(100, 1, 1, options);
                var courseAdminFields = courseAdminFieldsDataService.GetCourseAdminFields(100);

                // Then
                using (new AssertionScope())
                {
                    courseAdminFields !.CourseAdminField1Options.Should().BeEquivalentTo(options);
                }
            }
            finally
            {
                transaction.Dispose();
            }
        }
 public void UpdateAdminFieldForCourse(int customisationId, int promptId, string?options)
 {
     courseAdminFieldsDataService.UpdateAdminFieldForCourse(customisationId, promptId, options);
 }