當前位置: 首頁>>代碼示例>>Java>>正文


Java CamelTestSupport類代碼示例

本文整理匯總了Java中org.apache.camel.test.junit4.CamelTestSupport的典型用法代碼示例。如果您正苦於以下問題:Java CamelTestSupport類的具體用法?Java CamelTestSupport怎麽用?Java CamelTestSupport使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CamelTestSupport類屬於org.apache.camel.test.junit4包,在下文中一共展示了CamelTestSupport類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createSpringCamelContext

import org.apache.camel.test.junit4.CamelTestSupport; //導入依賴的package包/類
public static CamelContext createSpringCamelContext(CamelTestSupport test, String classpathUri) throws Exception {
    test.setUseRouteBuilder(false);

    final AbstractXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(classpathUri);
    test.setCamelContextService(new Service() {
        public void start() throws Exception {
            applicationContext.start();
        }

        public void stop() throws Exception {
            applicationContext.stop();
        }
    });

    return SpringCamelContext.springCamelContext(applicationContext);
}
 
開發者ID:jboss-fuse,項目名稱:camel-c24io,代碼行數:17,代碼來源:SpringTestHelper.java

示例2: tearDownAfterClass

import org.apache.camel.test.junit4.CamelTestSupport; //導入依賴的package包/類
@AfterClass
public static void tearDownAfterClass() throws Exception {
    if (threadLocalBundleContext.get() != null) {
        CamelBlueprintHelper.disposeBundleContext(threadLocalBundleContext.get());
        threadLocalBundleContext.remove();
    }
    CamelTestSupport.tearDownAfterClass();
}
 
開發者ID:HydAu,項目名稱:Camel,代碼行數:9,代碼來源:CamelBlueprintTestSupport.java

示例3: tearDownAfterClass

import org.apache.camel.test.junit4.CamelTestSupport; //導入依賴的package包/類
@AfterClass
public static void tearDownAfterClass() throws Exception {
    CamelTestSupport.tearDownAfterClass();

    // write the refresh token back to target/test-classes/test-options.properties
    final URL resource = AbstractBoxTestSupport.class.getResource(TEST_OPTIONS_PROPERTIES);
    final FileOutputStream out = new FileOutputStream(new File(resource.getPath()));
    propertyText = propertyText.replaceAll(REFRESH_TOKEN_PROPERTY + "=\\S*",
            REFRESH_TOKEN_PROPERTY + "=" + refreshToken);
    out.write(propertyText.getBytes("UTF-8"));
    out.close();
}
 
開發者ID:HydAu,項目名稱:Camel,代碼行數:13,代碼來源:AbstractBoxTestSupport.java

示例4: tearDownAfterClass

import org.apache.camel.test.junit4.CamelTestSupport; //導入依賴的package包/類
@AfterClass
public static void tearDownAfterClass() throws Exception {
    CamelTestSupport.tearDownAfterClass();
    // stop the proxy server after component
    LOG.info("Stopping proxy server...");
    server.stop();
    LOG.info("Stopped proxy server");
}
 
開發者ID:HydAu,項目名稱:Camel,代碼行數:9,代碼來源:HttpProxyIntegrationTest.java

示例5: tearDownAfterClass

import org.apache.camel.test.junit4.CamelTestSupport; //導入依賴的package包/類
@AfterClass
public static void tearDownAfterClass() throws Exception {
    CamelTestSupport.tearDownAfterClass();
}
 
開發者ID:HydAu,項目名稱:Camel,代碼行數:5,代碼來源:AbstractGoogleDriveTestSupport.java


注:本文中的org.apache.camel.test.junit4.CamelTestSupport類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。