Search in sources :

Example 46 with CertificateSerial

use of org.candlepin.model.CertificateSerial in project candlepin by candlepin.

the class CrlResourceTest method testUnrevokeWithNoArguments.

@Test
@SuppressWarnings("unchecked")
public void testUnrevokeWithNoArguments() throws Exception {
    String[] input = new String[] {};
    CandlepinQuery cqmock = mock(CandlepinQuery.class);
    List<CertificateSerial> serials = new LinkedList<>();
    when(cqmock.iterator()).thenReturn(serials.iterator());
    when(this.certSerialCurator.listBySerialIds(eq(input))).thenReturn(cqmock);
    this.resource.unrevoke(input);
    verifyNoMoreInteractions(crlFileUtil);
}
Also used : CertificateSerial(org.candlepin.model.CertificateSerial) CandlepinQuery(org.candlepin.model.CandlepinQuery) LinkedList(java.util.LinkedList) Test(org.junit.Test)

Aggregations

CertificateSerial (org.candlepin.model.CertificateSerial)46 Date (java.util.Date)23 Test (org.junit.Test)21 Consumer (org.candlepin.model.Consumer)16 IdentityCertificate (org.candlepin.model.IdentityCertificate)16 Entitlement (org.candlepin.model.Entitlement)11 EntitlementCertificate (org.candlepin.model.EntitlementCertificate)11 HashSet (java.util.HashSet)9 CandlepinQuery (org.candlepin.model.CandlepinQuery)9 Owner (org.candlepin.model.Owner)9 File (java.io.File)8 FileInputStream (java.io.FileInputStream)7 InputStream (java.io.InputStream)7 KeyPair (java.security.KeyPair)7 X509Certificate (java.security.cert.X509Certificate)7 ZipInputStream (java.util.zip.ZipInputStream)7 Principal (org.candlepin.auth.Principal)7 ConsumerType (org.candlepin.model.ConsumerType)7 HashMap (java.util.HashMap)6 KeyPair (org.candlepin.model.KeyPair)6