クラス TestUtils

java.lang.ObjectSE
org.springframework.integration.test.util.TestUtils

public abstract class TestUtils extends ObjectSE
作成者:
Mark Fisher, Iwein Fuld, Oleg Zhurakousky, Artem Bilan, Gary Russell
  • コンストラクターの詳細

    • TestUtils

      public TestUtils()
  • メソッドの詳細

    • getPropertyValue

      public static <T> T getPropertyValue(ObjectSE root, StringSE propertyPath, ClassSE<T> type)
      提供オブジェクトからプロパティの値を取得し、提供された型にキャストしてみてください。ピリオド区切り文字を介してネストされたプロパティをサポートします。
      型パラメーター:
      T - 期待値型。ピリオドで定義されたネストされたパスにすることができます。
      パラメーター:
      root - プロパティ値を取得するオブジェクト
      propertyPath - 値を取得するためのプロパティ名。
      type - 期待値型。
      戻り値:
      プロパティの値または null
      関連事項:
    • getPropertyValue

      public static ObjectSE getPropertyValue(ObjectSE root, StringSE propertyPath)
      提供オブジェクトからプロパティの値を取得します。ピリオド区切り文字を介してネストされたプロパティをサポートします。
      パラメーター:
      root - プロパティ値を取得するオブジェクト
      propertyPath - 値を取得するためのプロパティ名。ピリオドで定義されたネストされたパスにすることができます。
      戻り値:
      プロパティの値または null
      関連事項:
    • createTestApplicationContext

      public static TestUtils.TestApplicationContext createTestApplicationContext()
      基本的な Spring Integration インフラストラクチャで提供される TestUtils.TestApplicationContext インスタンスを作成します。
      戻り値:
      TestUtils.TestApplicationContext インスタンス
    • createTaskScheduler

      public static ThreadPoolTaskScheduler createTaskScheduler(int poolSize)
      提供された poolSize に基づく ThreadPoolTaskScheduler インスタンスのファクトリ。
      パラメーター:
      poolSize - ThreadPoolTaskScheduler のサイズ
      戻り値:
      ThreadPoolTaskScheduler インスタンス。
    • locateComponentInHistory

      public static PropertiesSE locateComponentInHistory(ListSE<PropertiesSE> history, StringSE componentName, int startingIndex)
      パラメーター:
      history - メッセージ履歴
      componentName - スキャンするコンポーネントの名前
      startingIndex - スキャンを開始するインデックス
      戻り値:
      名前付きコンポーネントによって提供されるプロパティ、または使用可能なものがない場合は null
    • applySystemFileSeparator

      public static StringSE applySystemFileSeparator(StringSE s)
      '/' をシステムのファイル区切り文字に置き換えて、ファイルパスを更新します。
      パラメーター:
      s - '/' を含むファイルパス。
      戻り値:
      更新されたファイルパス(必要な場合)。
    • adjustLogLevels

      public static TestUtils.LevelsContainer adjustLogLevels(StringSE methodName, ListSE<ClassSE<?>> classes, ListSE<StringSE> categories, org.apache.logging.log4j.Level level)
    • revertLogLevels

      public static void revertLogLevels(StringSE methodName, TestUtils.LevelsContainer container)