クラス TestUtils
java.lang.ObjectSE
org.springframework.integration.test.util.TestUtils
- 作成者:
- Mark Fisher, Iwein Fuld, Oleg Zhurakousky, Artem Bilan, Gary Russell, Glenn Renfro
ネストされたクラスの概要
ネストされたクラス修飾子と型クラス説明static final recordstatic classSpring Integration Bean を実行時にアプリケーションコンテキストに登録するためのいくつかのサポートメソッドを持つGenericApplicationContext拡張。コンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明static TestUtils.LevelsContaineradjustLogLevels(StringSE methodName, ListSE<ClassSE<?>> classes, ListSE<StringSE> categories, org.apache.logging.log4j.Level level) static StringSE'/' をシステムのファイル区切り文字に置き換えて、ファイルパスを更新します。static ThreadPoolTaskSchedulercreateTaskScheduler(int poolSize) 提供されたpoolSizeに基づくThreadPoolTaskSchedulerインスタンスのファクトリ。基本的な Spring Integration インフラストラクチャで提供されるTestUtils.TestApplicationContextインスタンスを作成します。static <T> @Nullable TgetPropertyValue(ObjectSE root, StringSE propertyPath) 指定されたオブジェクトから、プロパティの値を取得します。static <T> @Nullable TgetPropertyValue(ObjectSE root, StringSE propertyPath, ClassSE<T> type) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。static @Nullable PropertiesSElocateComponentInHistory(ListSE<PropertiesSE> history, StringSE componentName, int startingIndex) static voidregisterBean(StringSE beanName, ObjectSE bean, BeanFactory beanFactory) static voidrevertLogLevels(StringSE methodName, TestUtils.LevelsContainer container)
コンストラクターの詳細
TestUtils
public TestUtils()
方法の詳細
getPropertyValue
@DeprecatedSE(since="7.1", forRemoval=true) public static <T> @Nullable T getPropertyValue(ObjectSE root, StringSE propertyPath, ClassSE<T> type) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。getPropertyValue(Object, String)を推奨する 7.1 以降。指定されたオブジェクトからプロパティの値を取得し、指定された型にキャストを試みます。ピリオド区切り文字によるネストされたプロパティをサポートします。- 型パラメーター:
T- 期待値の型。期間によって定義されるネストされたパスにすることができます。- パラメーター:
root- プロパティ値を取得するオブジェクトpropertyPath- 値を取得するためのプロパティ名。type- 期待値型。- 戻り値:
- プロパティの値または null
- 関連事項:
getPropertyValue
指定されたオブジェクトからプロパティの値を取得します。ピリオド区切り文字によるネストされたプロパティをサポートします。- パラメーター:
root- プロパティ値を取得するオブジェクトpropertyPath- 値を取得するプロパティ名。ピリオドで定義されるネストされたパスを指定できます。- 戻り値:
- プロパティの値または null
- 関連事項:
createTestApplicationContext
基本的な Spring Integration インフラストラクチャで提供されるTestUtils.TestApplicationContextインスタンスを作成します。- 戻り値:
TestUtils.TestApplicationContextインスタンス
createTaskScheduler
提供されたpoolSizeに基づくThreadPoolTaskSchedulerインスタンスのファクトリ。- パラメーター:
poolSize-ThreadPoolTaskSchedulerのサイズ- 戻り値:
ThreadPoolTaskSchedulerインスタンス。
registerBean
locateComponentInHistory
public static @Nullable PropertiesSE locateComponentInHistory(ListSE<PropertiesSE> history, StringSE componentName, int startingIndex) - パラメーター:
history- メッセージ履歴componentName- スキャンするコンポーネントの名前startingIndex- スキャンを開始するインデックス- 戻り値:
- 名前付きコンポーネントによって提供されるプロパティ、または使用可能なものがない場合は null
applySystemFileSeparator
'/' をシステムのファイル区切り文字に置き換えて、ファイルパスを更新します。- パラメーター:
s- '/' を含むファイルパス。- 戻り値:
- 更新されたファイルパス(必要な場合)。
adjustLogLevels
revertLogLevels
getPropertyValue(Object, String)を推奨する 7.1 以降。