Search in sources :

Example 11 with CustomCertificateModel

use of com.synopsys.integration.alert.common.persistence.model.CustomCertificateModel in project hub-alert by blackducksoftware.

the class DefaultCustomCertificateAccessorTest method storeCertificateTest.

@Test
public void storeCertificateTest() throws Exception {
    CustomCertificateModel certificateModel = new CustomCertificateModel(alias, content, testDate.toString());
    CustomCertificateRepository customCertificateRepository = new MockCustomCertificateRepository();
    DefaultCustomCertificateAccessor customCertificateAccessor = new DefaultCustomCertificateAccessor(customCertificateRepository);
    CustomCertificateModel customCertificateModel = customCertificateAccessor.storeCertificate(certificateModel);
    testCustomCertificateModel(expectedCustomCertificateModel, customCertificateModel);
}
Also used : CustomCertificateModel(com.synopsys.integration.alert.common.persistence.model.CustomCertificateModel) CustomCertificateRepository(com.synopsys.integration.alert.database.certificates.CustomCertificateRepository) MockCustomCertificateRepository(com.synopsys.integration.alert.database.api.mock.MockCustomCertificateRepository) MockCustomCertificateRepository(com.synopsys.integration.alert.database.api.mock.MockCustomCertificateRepository) Test(org.junit.jupiter.api.Test)

Aggregations

CustomCertificateModel (com.synopsys.integration.alert.common.persistence.model.CustomCertificateModel)11 MockCustomCertificateRepository (com.synopsys.integration.alert.database.api.mock.MockCustomCertificateRepository)6 CustomCertificateRepository (com.synopsys.integration.alert.database.certificates.CustomCertificateRepository)6 Test (org.junit.jupiter.api.Test)6 AlertException (com.synopsys.integration.alert.api.common.model.exception.AlertException)4 ActionResponse (com.synopsys.integration.alert.common.action.ActionResponse)3 ValidationActionResponse (com.synopsys.integration.alert.common.action.ValidationActionResponse)3 AlertConfigurationException (com.synopsys.integration.alert.api.common.model.exception.AlertConfigurationException)1 AbstractResourceActions (com.synopsys.integration.alert.common.action.api.AbstractResourceActions)1 AlertFieldStatus (com.synopsys.integration.alert.common.descriptor.config.field.errors.AlertFieldStatus)1 ConfigContextEnum (com.synopsys.integration.alert.common.enumeration.ConfigContextEnum)1 CustomCertificateAccessor (com.synopsys.integration.alert.common.persistence.accessor.CustomCertificateAccessor)1 ValidationResponseModel (com.synopsys.integration.alert.common.rest.model.ValidationResponseModel)1 AuthorizationManager (com.synopsys.integration.alert.common.security.authorization.AuthorizationManager)1 AlertTrustStoreManager (com.synopsys.integration.alert.component.certificates.AlertTrustStoreManager)1 CertificatesDescriptor (com.synopsys.integration.alert.component.certificates.CertificatesDescriptor)1 CertificatesDescriptorKey (com.synopsys.integration.alert.component.certificates.CertificatesDescriptorKey)1 IntegrationEscapeUtil (com.synopsys.integration.util.IntegrationEscapeUtil)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1