Search in sources :

Example 1 with ExportExtensionAdapter

use of org.candlepin.service.ExportExtensionAdapter in project candlepin by candlepin.

the class ExporterTest method setUp.

@Before
public void setUp() {
    ctc = mock(ConsumerTypeCurator.class);
    mockEnvironmentCurator = mock(EnvironmentCurator.class);
    oc = mock(OwnerCurator.class);
    me = new MetaExporter();
    translator = new StandardTranslator(ctc, mockEnvironmentCurator, oc);
    ce = new ConsumerExporter(translator);
    cte = new ConsumerTypeExporter(translator);
    rc = mock(RulesCurator.class);
    re = new RulesExporter(rc);
    ece = new EntitlementCertExporter();
    ecsa = mock(EntitlementCertServiceAdapter.class);
    pe = new ProductExporter(translator);
    psa = mock(ProductServiceAdapter.class);
    pce = new ProductCertExporter();
    ec = mock(EntitlementCurator.class);
    ee = new EntitlementExporter(translator);
    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);
    cdne = new CdnExporter();
    pc = mock(ProductCurator.class);
    ProductCachedSerializationModule productCachedModule = new ProductCachedSerializationModule(pc);
    su = new SyncUtils(config, productCachedModule);
    exportExtensionAdapter = mock(ExportExtensionAdapter.class);
    when(exportRules.canExport(any(Entitlement.class))).thenReturn(Boolean.TRUE);
}
Also used : PrincipalProvider(org.candlepin.guice.PrincipalProvider) ConsumerTypeCurator(org.candlepin.model.ConsumerTypeCurator) PKIUtility(org.candlepin.pki.PKIUtility) OwnerCurator(org.candlepin.model.OwnerCurator) RulesCurator(org.candlepin.model.RulesCurator) ExportRules(org.candlepin.policy.js.export.ExportRules) DistributorVersionCurator(org.candlepin.model.DistributorVersionCurator) CdnCurator(org.candlepin.model.CdnCurator) EntitlementCurator(org.candlepin.model.EntitlementCurator) EntitlementCertServiceAdapter(org.candlepin.service.EntitlementCertServiceAdapter) StandardTranslator(org.candlepin.dto.StandardTranslator) ProductServiceAdapter(org.candlepin.service.ProductServiceAdapter) ProductCachedSerializationModule(org.candlepin.jackson.ProductCachedSerializationModule) CandlepinCommonTestConfig(org.candlepin.config.CandlepinCommonTestConfig) ProductCurator(org.candlepin.model.ProductCurator) EnvironmentCurator(org.candlepin.model.EnvironmentCurator) Entitlement(org.candlepin.model.Entitlement) ExportExtensionAdapter(org.candlepin.service.ExportExtensionAdapter) Before(org.junit.Before)

Aggregations

CandlepinCommonTestConfig (org.candlepin.config.CandlepinCommonTestConfig)1 StandardTranslator (org.candlepin.dto.StandardTranslator)1 PrincipalProvider (org.candlepin.guice.PrincipalProvider)1 ProductCachedSerializationModule (org.candlepin.jackson.ProductCachedSerializationModule)1 CdnCurator (org.candlepin.model.CdnCurator)1 ConsumerTypeCurator (org.candlepin.model.ConsumerTypeCurator)1 DistributorVersionCurator (org.candlepin.model.DistributorVersionCurator)1 Entitlement (org.candlepin.model.Entitlement)1 EntitlementCurator (org.candlepin.model.EntitlementCurator)1 EnvironmentCurator (org.candlepin.model.EnvironmentCurator)1 OwnerCurator (org.candlepin.model.OwnerCurator)1 ProductCurator (org.candlepin.model.ProductCurator)1 RulesCurator (org.candlepin.model.RulesCurator)1 PKIUtility (org.candlepin.pki.PKIUtility)1 ExportRules (org.candlepin.policy.js.export.ExportRules)1 EntitlementCertServiceAdapter (org.candlepin.service.EntitlementCertServiceAdapter)1 ExportExtensionAdapter (org.candlepin.service.ExportExtensionAdapter)1 ProductServiceAdapter (org.candlepin.service.ProductServiceAdapter)1 Before (org.junit.Before)1