use of org.nhindirect.config.store.Certificate.CertContainer in project nhin-d by DirectProject.
the class TrustBundleServiceTest method testUpdateTrustBundleAttributes.
public void testUpdateTrustBundleAttributes() throws Exception {
X509Certificate cert = mock(X509Certificate.class);
CertContainer container = mock(CertContainer.class);
when(container.getCert()).thenReturn(cert);
Certificate confCert = mock(Certificate.class);
when(confCert.toCredential()).thenReturn(container);
impl.updateTrustBundleAttributes(1234, "test bundle", "http://bundle/bundle", confCert, 8);
verify(dao, times(1)).updateTrustBundleAttributes(eq((long) 1234), eq("test bundle"), eq("http://bundle/bundle"), (X509Certificate) any(), eq((int) 8));
}
use of org.nhindirect.config.store.Certificate.CertContainer in project nhin-d by DirectProject.
the class TrustBundleServiceTest method testUpdateTrustBundleSigningCertificate.
public void testUpdateTrustBundleSigningCertificate() throws Exception {
X509Certificate cert = mock(X509Certificate.class);
CertContainer container = mock(CertContainer.class);
when(container.getCert()).thenReturn(cert);
Certificate confCert = mock(Certificate.class);
when(confCert.toCredential()).thenReturn(container);
impl.updateTrustBundleSigningCertificate(1234, confCert);
verify(dao, times(1)).updateTrustBundleSigningCertificate(eq((long) 1234), (X509Certificate) any());
}
Aggregations