public async Task Should_Validate_Enrollment_Parameters(string userId, string courseId, string role)
 {
     await Assert.ThrowsAsync <ValidationException>(() => _service.EnrollUserToCourseAsync(new TalentLmsEnrollmentDto
     {
         UserId   = userId,
         CourseId = courseId,
         Role     = role
     }));
 }
Beispiel #2
0
 protected override async Task RegisterUserToExternalEventAsync(ExternalAccount account, ExternalEvent externalEvent)
 {
     await _apiService.EnrollUserToCourseAsync(new TalentLmsEnrollmentDto
     {
         UserId   = account.ExternalAccountId,
         CourseId = externalEvent.ExternalEventId,
         Role     = TalentLmsEnrollmentDto.Learner // TODO: Instructor role support?
     });
 }