use of org.wso2.carbon.apimgt.impl.certificatemgt.ResponseCode in project carbon-apimgt by wso2.
the class CertificateMgtUtilTest method testUpdateCertificate.
@Test
public void testUpdateCertificate() throws CertificateManagementException {
ResponseCode responseCode = certificateMgtUtils.updateCertificate(BASE64_ENCODED_CERT_STRING, ALIAS);
Assert.assertEquals(ResponseCode.SUCCESS, responseCode);
}
use of org.wso2.carbon.apimgt.impl.certificatemgt.ResponseCode in project carbon-apimgt by wso2.
the class CertificateMgtUtilTest method testUpdateCertificateWithExpiredCertificate.
@Test
public void testUpdateCertificateWithExpiredCertificate() throws CertificateManagementException {
ResponseCode responseCode = certificateMgtUtils.updateCertificate(EXPIRED_CERTIFICATE, ALIAS);
Assert.assertEquals(ResponseCode.CERTIFICATE_EXPIRED, responseCode);
}
use of org.wso2.carbon.apimgt.impl.certificatemgt.ResponseCode in project carbon-apimgt by wso2.
the class CertificateMgtUtilTest method testAddCertificateToTrustStore.
@Test
public void testAddCertificateToTrustStore() {
ResponseCode result = certificateMgtUtils.addCertificateToTrustStore(BASE64_ENCODED_CERT_STRING, ALIAS);
Assert.assertEquals(result, ResponseCode.SUCCESS);
}
use of org.wso2.carbon.apimgt.impl.certificatemgt.ResponseCode in project carbon-apimgt by wso2.
the class CertificateMgtUtilTest method testUpdateCertificateWithEmptyCertificate.
@Test
public void testUpdateCertificateWithEmptyCertificate() throws CertificateManagementException {
ResponseCode responseCode = certificateMgtUtils.updateCertificate("", ALIAS);
Assert.assertEquals(ResponseCode.INTERNAL_SERVER_ERROR, responseCode);
}
use of org.wso2.carbon.apimgt.impl.certificatemgt.ResponseCode in project carbon-apimgt by wso2.
the class CertificateMgtUtilTest method testUpdateCertificateWithCertificateNotFound.
@Test
public void testUpdateCertificateWithCertificateNotFound() throws CertificateManagementException {
ResponseCode responseCode = certificateMgtUtils.updateCertificate(BASE64_ENCODED_CERT_STRING, ALIAS_NOT_EXIST);
Assert.assertEquals(ResponseCode.CERTIFICATE_NOT_FOUND, responseCode);
}
Aggregations