Package org.candlepin.model

Examples of org.candlepin.model.CertificateSerialCurator


*/
public class CertificateSerialResourceTest {

    @Test
    public void listall() {
        CertificateSerialCurator csc = mock(CertificateSerialCurator.class);
        CertificateSerialResource csr = new CertificateSerialResource(csc);
        List<CertificateSerial> serials = new ArrayList<CertificateSerial>();
        serials.add(mock(CertificateSerial.class));
        when(csc.listAll()).thenReturn(serials);
        assertEquals(serials, csr.getCertificateSerials());
    }
View Full Code Here


        assertEquals(serials, csr.getCertificateSerials());
    }

    @Test
    public void getSerial() {
        CertificateSerialCurator csc = mock(CertificateSerialCurator.class);
        CertificateSerialResource csr = new CertificateSerialResource(csc);
        CertificateSerial cs = mock(CertificateSerial.class);
        when(csc.find(10L)).thenReturn(cs);
        assertEquals(cs, csr.getCertificateSerial(10L));
    }
View Full Code Here

    @Test
    @SuppressWarnings("unchecked")
    public void unrevoke() throws Exception {
        CrlGenerator crlgen = mock(CrlGenerator.class);
        CrlFileUtil fileutil = mock(CrlFileUtil.class);
        CertificateSerialCurator sercur = mock(CertificateSerialCurator.class);
        Configuration config = new ConfigForTesting();
        X509CRL crl = mock(X509CRL.class);
        when(fileutil.readCRLFile(any(File.class))).thenReturn(crl);
        when(crlgen.removeEntries(eq(crl), any(List.class))).thenReturn(crl);
View Full Code Here

TOP

Related Classes of org.candlepin.model.CertificateSerialCurator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.