use of com.venafi.vcert.sdk.certificate.CertificateRequest in project vcert-java by Venafi.
the class VCertClientTest method retrieveCertificate.
@Test
@DisplayName("Retrieve certificate")
void retrieveCertificate() throws VCertException {
final CertificateRequest certificateRequest = mock(CertificateRequest.class);
classUnderTest.retrieveCertificate(certificateRequest);
verify(connector).retrieveCertificate(certificateRequest);
}
use of com.venafi.vcert.sdk.certificate.CertificateRequest in project vcert-java by Venafi.
the class VCertTknClientTest method retrieveCertificateWithServerError.
@Test
@DisplayName("Retrieve certificate with server error")
void retrieveCertificateWithServerError() throws VCertException {
final CertificateRequest certificateRequest = mock(CertificateRequest.class);
doThrow(new FeignException.InternalServerError("Error", request, "".getBytes())).when(connector).retrieveCertificate(certificateRequest);
assertThrows(VCertException.class, () -> classUnderTest.retrieveCertificate(certificateRequest));
}
use of com.venafi.vcert.sdk.certificate.CertificateRequest in project vcert-java by Venafi.
the class VCertTknClientTest method requestCertificate.
@Test
@DisplayName("Request certificate")
void requestCertificate() throws VCertException {
final CertificateRequest certificateRequest = mock(CertificateRequest.class);
final ZoneConfiguration zoneConfiguration = mock(ZoneConfiguration.class);
zoneConfiguration.zoneId("test_zone");
classUnderTest.requestCertificate(certificateRequest, zoneConfiguration);
verify(connector).requestCertificate(certificateRequest, zoneConfiguration);
}
use of com.venafi.vcert.sdk.certificate.CertificateRequest in project vcert-java by Venafi.
the class VCertTknClientTest method retrieveCertificate.
@Test
@DisplayName("Retrieve certificate")
void retrieveCertificate() throws VCertException {
final CertificateRequest certificateRequest = mock(CertificateRequest.class);
classUnderTest.retrieveCertificate(certificateRequest);
verify(connector).retrieveCertificate(certificateRequest);
}
use of com.venafi.vcert.sdk.certificate.CertificateRequest in project vcert-java by Venafi.
the class VCertTknClientTest method generateRequest.
@Test
@DisplayName("Generate request")
void generateRequest() throws VCertException {
final ZoneConfiguration zoneConfiguration = mock(ZoneConfiguration.class);
final CertificateRequest certificateRequest = mock(CertificateRequest.class);
classUnderTest.generateRequest(zoneConfiguration, certificateRequest);
verify(connector).generateRequest(zoneConfiguration, certificateRequest);
}
Aggregations