public void UpdateCustomPromptForCourse_calls_data_service() { // Given A.CallTo(() => courseAdminFieldsDataService.UpdateCustomPromptForCourse(1, 1, null)).DoesNothing(); // When courseAdminFieldsService.UpdateCustomPromptForCourse(1, 1, null); // Then A.CallTo(() => courseAdminFieldsDataService.UpdateCustomPromptForCourse(1, 1, null)).MustHaveHappened(); }
public void UpdateCustomPromptForCourse_correctly_updates_custom_prompt() { using var transaction = new TransactionScope(); try { // Given const string?options = "options"; // When courseAdminFieldsDataService.UpdateCustomPromptForCourse(100, 1, 1, options); var courseAdminFields = courseAdminFieldsDataService.GetCourseAdminFields(100); // Then using (new AssertionScope()) { courseAdminFields !.CustomField1Options.Should().BeEquivalentTo(options); } } finally { transaction.Dispose(); } }
public void UpdateCustomPromptForCourse(int customisationId, int promptId, string?options) { courseAdminFieldsDataService.UpdateCustomPromptForCourse(customisationId, promptId, options); }