Class TestUtils

java.lang.Object
org.citrusframework.util.TestUtils

public abstract class TestUtils extends Object
Utility class for test cases providing several utility methods regarding Citrus test cases.
  • Field Details

    • WAIT_THREAD_PREFIX

      public static final String WAIT_THREAD_PREFIX
      Used to identify waiting task threads pool
      See Also:
  • Method Details

    • waitForCompletion

      public static void waitForCompletion(Completable container, TestContext context)
      Wait for container completion with default timeout.
    • waitForCompletion

      public static void waitForCompletion(Completable container, TestContext context, long timeout)
      Wait for container completion using default thread executor.
    • waitForCompletion

      public static void waitForCompletion(ScheduledExecutorService scheduledExecutor, Completable container, TestContext context, long timeout)
      Uses given scheduler to wait for container to finish properly. Method polls for done state on container for given amount of time.
    • normalizeLineEndings

      public static String normalizeLineEndings(String text)
      Normalize the text by trimming whitespace and replacing line endings by a linux representation.