Class LoaderUtil


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <E,​A>
      void
      assertLength​(java.lang.String message, E[] expected, java.util.function.Function<E,​java.lang.String> expectedToString, A[] actual, java.util.function.Function<A,​java.lang.String> actualToString)
      Asserts the arrays are of the same length, providing useful debug information if not.
      static <T> void assertLength​(java.lang.String message, T[] expected, T[] actual, java.util.function.Function<T,​java.lang.String> toString)
      Asserts the arrays are of the same length, providing useful debug information if not.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • assertLength

        public static <T> void assertLength​(java.lang.String message,
                                            T[] expected,
                                            T[] actual,
                                            java.util.function.Function<T,​java.lang.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​(java.lang.String message,
                                                    E[] expected,
                                                    java.util.function.Function<E,​java.lang.String> expectedToString,
                                                    A[] actual,
                                                    java.util.function.Function<A,​java.lang.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.