Search in sources :

Example 1 with SimpleModelTranslator

use of org.candlepin.dto.SimpleModelTranslator in project candlepin by candlepin.

the class ContentResourceTest method init.

@Before
public void init() {
    i18n = I18nFactory.getI18n(getClass(), Locale.US, I18nFactory.FALLBACK);
    cc = mock(ContentCurator.class);
    envContentCurator = mock(EnvironmentContentCurator.class);
    poolManager = mock(PoolManager.class);
    oc = mock(OwnerCurator.class);
    productCurator = mock(ProductCurator.class);
    this.modelTranslator = new SimpleModelTranslator();
    this.modelTranslator.registerTranslator(new ContentTranslator(), Content.class, ContentDTO.class);
    cr = new ContentResource(cc, i18n, new DefaultUniqueIdGenerator(), envContentCurator, poolManager, productCurator, oc, this.modelTranslator);
}
Also used : OwnerCurator(org.candlepin.model.OwnerCurator) ContentTranslator(org.candlepin.dto.api.v1.ContentTranslator) SimpleModelTranslator(org.candlepin.dto.SimpleModelTranslator) EnvironmentContentCurator(org.candlepin.model.EnvironmentContentCurator) ContentCurator(org.candlepin.model.ContentCurator) ProductCurator(org.candlepin.model.ProductCurator) DefaultUniqueIdGenerator(org.candlepin.service.impl.DefaultUniqueIdGenerator) EnvironmentContentCurator(org.candlepin.model.EnvironmentContentCurator) PoolManager(org.candlepin.controller.PoolManager) Before(org.junit.Before)

Aggregations

PoolManager (org.candlepin.controller.PoolManager)1 SimpleModelTranslator (org.candlepin.dto.SimpleModelTranslator)1 ContentTranslator (org.candlepin.dto.api.v1.ContentTranslator)1 ContentCurator (org.candlepin.model.ContentCurator)1 EnvironmentContentCurator (org.candlepin.model.EnvironmentContentCurator)1 OwnerCurator (org.candlepin.model.OwnerCurator)1 ProductCurator (org.candlepin.model.ProductCurator)1 DefaultUniqueIdGenerator (org.candlepin.service.impl.DefaultUniqueIdGenerator)1 Before (org.junit.Before)1