Package org.candlepin.config

Examples of org.candlepin.config.CandlepinCommonTestConfig


        psa = mock(ProductServiceAdapter.class);
        pce = new ProductCertExporter();
        ec = mock(EntitlementCurator.class);
        ee = new EntitlementExporter();
        pki = mock(PKIUtility.class);
        config = new CandlepinCommonTestConfig();
        exportRules = mock(ExportRules.class);
        pprov = mock(PrincipalProvider.class);
        dvc = mock(DistributorVersionCurator.class);
        dve = new DistributorVersionExporter();
        cdnc = mock(CdnCurator.class);
View Full Code Here


        return new AuthInterceptorTestModule();
    }

    @Before
    public void setUp() {
        config = new CandlepinCommonTestConfig();
        usa = mock(UserServiceAdapter.class);
        dcc = mock(DeletedConsumerCurator.class);
        permFactory = mock(PermissionFactory.class);
        interceptor = new AuthInterceptor(config, usa,
            consumerCurator, dcc, injector, i18n);
View Full Code Here

    @Test
    public void testRegenerateEntitlementCertificateWithValidConsumerByEntitlement() {
        ConsumerResource cr = new ConsumerResource(this.consumerCurator, null,
                null, null, this.entitlementCurator, null, null, null, null, null,
                null, null, null, null, this.poolManager, null, null, null,
                null, null, null, null, null, new CandlepinCommonTestConfig(), null,
                null, null, mock(ConsumerBindUtil.class));

        Response rsp = consumerResource.bind(
            consumer.getUuid(), pool.getId().toString(), null, 1, null,
            null, false, null, null);
View Full Code Here

        ConsumerResource consumerResource = new ConsumerResource(
            mockedConsumerCurator, null, null, null, mockedEntitlementCurator, null,
            mockedEntitlementCertServiceAdapter, null, null, null, null, null,
            null, null, mockedPoolManager, null, null, null, null, null,
            null, null, null, new CandlepinCommonTestConfig(), null, null, null,
            consumerBindUtil);

        List<CertificateSerialDto> serials = consumerResource
            .getEntitlementCertificateSerials(consumer.getUuid());
View Full Code Here

            .thenThrow(new IOException());

        CandlepinPoolManager poolManager = new CandlepinPoolManager(null,
            mockedSubscriptionServiceAdapter, null,
            mockedEntitlementCertServiceAdapter, null, null,
            new CandlepinCommonTestConfig(), null, null,
            mockedEntitlementCurator, mockedConsumerCurator, null, null, null,
            mockedActivationKeyRules);

        ConsumerResource consumerResource = new ConsumerResource(
            mockedConsumerCurator, null, null, null, mockedEntitlementCurator, null,
            mockedEntitlementCertServiceAdapter, null, null, null, null, null, null,
            null, poolManager, null, null, null, null, null, null, null, null,
            new CandlepinCommonTestConfig(), null, null, null, consumerBindUtil);

        consumerResource.regenerateEntitlementCertificates(consumer.getUuid(), "9999",
            false);
    }
View Full Code Here

        CandlepinPoolManager mgr = mock(CandlepinPoolManager.class);
        ConsumerResource cr = new ConsumerResource(mockedConsumerCurator, null,
            null, null, null, null, null, null, null, null, null, null, null,
            null, mgr, null, null, null, null, null, null, null, null,
            new CandlepinCommonTestConfig(), null, null, null, consumerBindUtil);
        cr.regenerateEntitlementCertificates(consumer.getUuid(), null, true);
        Mockito.verify(mgr, Mockito.times(1))
            .regenerateEntitlementCertificates(eq(consumer), eq(true));
    }
View Full Code Here

            createIdCert());

        ConsumerResource cr = new ConsumerResource(mockedConsumerCurator, null,
            null, null, null, mockedIdSvc, null, null, sink, eventFactory, null, null,
            null, null, null, null, mockedOwnerCurator, null, null, null, null,
            null, null, new CandlepinCommonTestConfig(), null, null, null, consumerBindUtil);

        Consumer fooc = cr.regenerateIdentityCertificates(consumer.getUuid());

        assertNotNull(fooc);
        IdentityCertificate ic1 = fooc.getIdCert();
View Full Code Here

            createIdCert());

        ConsumerResource cr = new ConsumerResource(mockedConsumerCurator, null,
            null, ssa, null, mockedIdSvc, null, null, sink, eventFactory, null, null,
            null, null, null, null, mockedOwnerCurator, null, null, rules, null,
            null, null, new CandlepinCommonTestConfig(), null, null, null, consumerBindUtil);
        Consumer c = cr.getConsumer(consumer.getUuid());

        assertFalse(origserial.equals(c.getIdCert().getSerial().getSerial()));
    }
View Full Code Here

            consumer);

        ConsumerResource cr = new ConsumerResource(mockedConsumerCurator, null,
            null, ssa, null, null, null, null, null, null, null, null, null, null,
            null, null, mockedOwnerCurator, null, null, rules, null, null, null,
            new CandlepinCommonTestConfig(), null, null, null, consumerBindUtil);

        Consumer c = cr.getConsumer(consumer.getUuid());

        assertEquals(origserial, c.getIdCert().getSerial().getSerial());
    }
View Full Code Here

        when(ctc.lookupByLabel(eq("person"))).thenReturn(cType);

        ConsumerResource cr = new ConsumerResource(null, ctc,
            null, null, null, null, null, i18n, null, null, null, null,
            null, null, null, null, oc, akc, null, null, null, null,
            null, new CandlepinCommonTestConfig(), null, null, null, consumerBindUtil);
        cr.create(c, nap, null, "testOwner", "testKey");
    }
View Full Code Here

TOP

Related Classes of org.candlepin.config.CandlepinCommonTestConfig

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.