use of org.commonjava.indy.test.fixture.core.MockInstance in project indy by Commonjava.
the class PromotionManagerTest method setup.
@Before
public void setup() throws Exception {
contentMetadata.clear();
galleyParts = new GalleyMavenFixture(true, temp);
galleyParts.initMissingComponents();
storeManager = new MemoryStoreDataManager(true);
downloadManager = new DefaultDownloadManager(storeManager, galleyParts.getTransferManager(), new IndyLocationExpander(storeManager), new MockInstance<>(new MockContentAdvisor()));
DirectContentAccess dca = new DefaultDirectContentAccess(downloadManager, Executors.newSingleThreadExecutor());
ContentDigester contentDigester = new DefaultContentDigester(dca, new CacheHandle<String, TransferMetadata>("content-metadata", contentMetadata));
contentManager = new DefaultContentManager(storeManager, downloadManager, new IndyObjectMapper(true), new SpecialPathManagerImpl(), new MemoryNotFoundCache(), contentDigester, Collections.<ContentGenerator>emptySet());
dataManager = new DataFileManager(temp.newFolder("data"), new DataFileEventManager());
validationsManager = new PromoteValidationsManager(dataManager, new PromoteConfig(), new ValidationRuleParser(new ScriptEngine(dataManager), new IndyObjectMapper(true)));
MavenModelProcessor modelProcessor = new MavenModelProcessor();
validator = new PromotionValidator(validationsManager, new PromotionValidationTools(contentManager, storeManager, galleyParts.getPomReader(), galleyParts.getMavenMetadataReader(), modelProcessor, galleyParts.getTypeMapper(), galleyParts.getTransferManager(), contentDigester), storeManager);
PromoteConfig config = new PromoteConfig();
manager = new PromotionManager(validator, contentManager, downloadManager, storeManager, config);
executor = Executors.newCachedThreadPool();
}
Aggregations