Пример #1
0
        public async Task CredentialsTranscript_Delete_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.DeleteTranscriptAsync("transcriptProviderId-1", 12345, "Student123", 55);

            // Assert (No exception)
        }
        public async Task DeleteTranscriptAsync(int schoolId, string studentId, int transcriptId)
        {
            // Get School Settings
            SchoolSettingModel schoolSettings = await _schoolSettingRepository.GetBySchoolIdAsync(schoolId);

            // License check
            LicenseCheck(schoolSettings);

            // Delete the transcript via API
            await _transcriptProviderAPIService.DeleteTranscriptAsync(schoolSettings.TranscriptProviderId, schoolId, studentId, transcriptId);
        }