private async Task AcceptRequestsAllApplications() { Skip.If(!_fixture.RegistrationOk); foreach (var application in _applicationTestSet) { foreach (var requestId in application.RequestIds) { var appModel = application.Model; var applicationId = application.Model.ApplicationId.ToString(); var request = await _certificateRequest.ReadAsync(requestId); if (request.State == CertificateRequestState.Approved) { await _certificateRequest.AcceptAsync(requestId); request = await _certificateRequest.ReadAsync(requestId); Assert.Equal(CertificateRequestState.Accepted, request.State); } else { await Assert.ThrowsAsync <ResourceInvalidStateException>(async() => { await _certificateRequest.AcceptAsync(requestId); }); } } } }
public async Task AcceptCertificateRequestAsync(string requestId) { await _certificateRequest.AcceptAsync(requestId); }