@BeforeClass public static void initStaticData() throws Exception { customModelService = APP_CONTEXT_INIT.getApplicationContext().getBean("customModelService", CustomModelService.class); transactionHelper = APP_CONTEXT_INIT.getApplicationContext().getBean("retryingTransactionHelper", RetryingTransactionHelper.class); personService = APP_CONTEXT_INIT.getApplicationContext().getBean("personService", PersonService.class); authorityService = APP_CONTEXT_INIT.getApplicationContext().getBean("authorityService", AuthorityService.class); cmmDownloadTestUtil = new CMMDownloadTestUtil(APP_CONTEXT_INIT.getApplicationContext()); }
@AfterClass public static void cleanUp() { cmmDownloadTestUtil.cleanup(); AuthenticationUtil.clearCurrentSecurityContext(); }
DownloadStatus status = cmmDownloadTestUtil.getDownloadStatus(downloadNode); while (status.getStatus() == DownloadStatus.Status.PENDING) status = cmmDownloadTestUtil.getDownloadStatus(downloadNode); Set<String> entries = cmmDownloadTestUtil.getDownloadEntries(downloadNode); assertEquals(1, entries.size()); String modelEntry = cmmDownloadTestUtil.getDownloadEntry(entries, modelExportFileName); assertNotNull(modelEntry); assertEquals(modelEntry, modelExportFileName); cmmDownloadTestUtil.createShareExtModule(modelName); status = cmmDownloadTestUtil.getDownloadStatus(downloadNode); while (status.getStatus() == DownloadStatus.Status.PENDING) status = cmmDownloadTestUtil.getDownloadStatus(downloadNode); entries = cmmDownloadTestUtil.getDownloadEntries(downloadNode); assertEquals(2, entries.size()); modelEntry = cmmDownloadTestUtil.getDownloadEntry(entries, modelExportFileName); assertNotNull(modelEntry); assertEquals(modelEntry, modelExportFileName); String shareExtEntry = cmmDownloadTestUtil.getDownloadEntry(entries, shareExtExportFileName); assertNotNull(shareExtEntry); assertEquals(shareExtEntry, shareExtExportFileName);
public synchronized void createShareExtModule(final String moduleId) List<NodeRef> results = searchService.selectNodes(getRootNode(), SURF_CONFIG_PATH, null, namespaceService, false, SearchService.LANGUAGE_XPATH); assertTrue(results.size() == 1);