Class LoaderUtil

java.lang.Object
net.officefloor.compile.test.util.LoaderUtil

public class LoaderUtil extends Object
Utility methods for loader test utilities.
Author:
Daniel Sagenschneider
  • Method Details

    • assertLength

      public static <T> void assertLength(String message, T[] expected, T[] actual, Function<T,String> toString)
      Asserts the arrays are of the same length, providing useful debug information if not.
      Type Parameters:
      T - Entry type.
      Parameters:
      message - Message.
      expected - Expected items of array.
      actual - Actual items of array.
      toString - Function to obtain String description of item.
    • assertLength

      public static <E, A> void assertLength(String message, E[] expected, Function<E,String> expectedToString, A[] actual, Function<A,String> actualToString)
      Asserts the arrays are of the same length, providing useful debug information if not.
      Type Parameters:
      E - Expected type.
      A - Actual type.
      Parameters:
      message - Message.
      expected - Expected items of array.
      expectedToString - Function to obtain String description of expected item.
      actual - Actual items of array.
      actualToString - Function to obtain String description of actual item.