public async Task SendTranscriptRequestAsync(int transcriptRequestId, string studentId, int transcriptId, int schoolId, string receivingInstitutionCode, string receivingInstitutionName, int modifiedById, string receivingInstitutionEmail = "") { // Get School Settings SchoolSettingModel schoolSettings = await _schoolSettingRepository.GetBySchoolIdAsync(schoolId); // License check LicenseCheck(schoolSettings); // Send the transcript request via API await _transcriptProviderAPIService.SendTranscriptRequestAsync(schoolSettings.TranscriptProviderId, transcriptRequestId, studentId, transcriptId, schoolId, receivingInstitutionCode, receivingInstitutionName, receivingInstitutionEmail); // Update the transcript request history await _transcriptRequestRepository.AppendHistoryAsync(transcriptRequestId, TranscriptRequestStatus.Submitted, modifiedById); }
public async Task CredentialsTranscriptRequest_Send_Success() { // Arrange var response = new Mock <RestResponse <CredentialsAPIResponseModel> >(); response.Object.StatusCode = System.Net.HttpStatusCode.OK; response.Object.Data = new CredentialsAPIResponseModel(); response.Object.Data.STATUS = "SUCCESS"; response.Object.Data.ERROR = null; _mockRestClient.Setup(s => s.ExecuteTaskAsync <CredentialsAPIResponseModel>(It.IsAny <RestRequest>())).ReturnsAsync(response.Object); // Act await _transcriptAPIProviderService.SendTranscriptRequestAsync("transcriptProviderId-1", 1, "12345", 1, xello_test_account_school_id, "45784", "NCAA"); // Assert (No exception) }