Search in sources :

Example 6 with CustomCertificateRepository

use of com.synopsys.integration.alert.database.certificates.CustomCertificateRepository 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)6 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 AlertConfigurationException (com.synopsys.integration.alert.api.common.model.exception.AlertConfigurationException)1