internal void Test_UpdateNewCourse(dynamic testCase, bool isRunningAndPublished) { var arrangedCourses = Context.GetCourse(testCase.providerCode, testCase.courseCode, Email); Test_ArrangedState(arrangedCourses, testCase.arrangedStatus, testCase.arrangedPublish, testCase.courseCode); Service.UpdateNewCourse(testCase.providerCode, testCase.courseCode, Email); var courses = Context.GetCourse(testCase.providerCode, testCase.courseCode, Email); Test_RunningAndPublished(courses, testCase.arrangedStatus, testCase.arrangedPublish, testCase.courseCode, isRunningAndPublished); }
public async Task <ActionResult> PublishCourseToSearchAndCompare(string providerCode, string courseCode) { var name = this.User.Identity.Name; // update course status from new to running only if provider is opted in _transitionService.UpdateNewCourse(providerCode, courseCode, name); var enrichmentResult = _enrichmentservice.PublishCourseEnrichment(providerCode, courseCode, name); await _manageCoursesBackendService.SaveCourse(providerCode, courseCode, name); return(Ok(enrichmentResult)); }