で定義されたルートがあり、 http://camel.apache.org/mock.htmlCamelRoutes.xml
の下部に記載されているラッピング手法を使用してテストしたいと考えています。
じぶんのCamelRoutes.xml
<route autoStartup="true" xmlns="http://camel.apache.org/schema/spring">
<from uri="direct:start"/>
<to uri="direct:end"/>
</route>
だから私はCamelRoutesTest.xml
含むものを作成しました:
<import resource="CamelRoutes.xml"/>
<bean id="mockAllEndpoints" class="org.apache.camel.impl.InterceptSendToMockEndpointStrategy"/>
しかし、Spring xml をロードし、モック エンドポイントへのアクセスを提供するテストを作成する方法がわかりません。
私が使用する場合..
@ContextConfiguration( locations=("/CamelRoutesTest"))
public class CamelTest extends AbstractJUnit38SpringContextTests
}
次に、モックエンドポイントを取得する方法がわかりません
私が使用する場合..
public class CamelTest extends CamelTestSupport
}
次に、ラクダのコンテキストをロードする方法がわかりません..
CamelTestSupport
Spring xml から AND ロード ルートを使用する Web サイトでサンプル テストを見つけることができないようです。