Package org.candlepin.policy.js.compliance

Examples of org.candlepin.policy.js.compliance.ComplianceRules


            .mock(IdentityCertServiceAdapter.class);

        EventSink sink = Mockito.mock(EventSinkImpl.class);

        SubscriptionServiceAdapter ssa = Mockito.mock(SubscriptionServiceAdapter.class);
        ComplianceRules rules = Mockito.mock(ComplianceRules.class);

        Consumer consumer = createConsumer();
        ComplianceStatus status = new ComplianceStatus();
        when(rules.getStatus(any(Consumer.class), any(Date.class), anyBoolean())).thenReturn(status);
        // cert expires today which will trigger regen
        consumer.setIdCert(createIdCert());
        BigInteger origserial = consumer.getIdCert().getSerial().getSerial();

        when(mockedConsumerCurator.verifyAndLookupConsumer(consumer.getUuid())).thenReturn(
View Full Code Here


    }

    @Test
    public void testIdCertDoesNotRegenerate() throws Exception {
        SubscriptionServiceAdapter ssa = Mockito.mock(SubscriptionServiceAdapter.class);
        ComplianceRules rules = Mockito.mock(ComplianceRules.class);

        Consumer consumer = createConsumer();
        ComplianceStatus status = new ComplianceStatus();
        when(rules.getStatus(any(Consumer.class), any(Date.class), anyBoolean())).thenReturn(status);
        consumer.setIdCert(createIdCert(TestUtil.createDate(2025, 6, 9)));
        BigInteger origserial = consumer.getIdCert().getSerial().getSerial();

        when(mockedConsumerCurator.verifyAndLookupConsumer(consumer.getUuid())).thenReturn(
            consumer);
View Full Code Here

        when(eventSinkProvider.get()).thenReturn(eventSink);
        provider = new JsRunnerProvider(rulesCuratorMock);
        Locale locale = new Locale("en_US");
        i18n = I18nFactory.getI18n(getClass(), "org.candlepin.i18n.Messages", locale,
            I18nFactory.FALLBACK);
        compliance = new ComplianceRules(provider.get(),
            entCurator, new StatusReasonMessageGenerator(i18n), eventSinkProvider,
            consumerCurator);
        owner = new Owner("test");
    }
View Full Code Here

TOP

Related Classes of org.candlepin.policy.js.compliance.ComplianceRules

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.