Package gw.test

Class AssertUtil

    • Constructor Detail

      • AssertUtil

        public AssertUtil()
    • Method Detail

      • assertArrayEquals

        public static void assertArrayEquals​(Object[] expected,
                                             Object[] got)
      • assertArrayEquals

        public static void assertArrayEquals​(Object[] expected,
                                             Object[] got,
                                             TestClass.EqualityTester tester)
        Verifies that all elements in the first array are present in the second array and match the elements in the first array. Uses EqualityUtil to determine equality and is order-insensitive.
        Parameters:
        expected - the expected result (reference)
        got - the obtained result (what to compare against the reference)
      • assertArrayEquals

        public static void assertArrayEquals​(String message,
                                             Object[] o1,
                                             Object[] o2)
      • assertSetsEqual

        public static void assertSetsEqual​(Set o1,
                                           Set o2)
      • assertCollectionEquals

        public static void assertCollectionEquals​(Collection o1,
                                                  Collection o2)
      • assertListEquals

        public static void assertListEquals​(List o1,
                                            List o2)
      • assertIterableEquals

        public static void assertIterableEquals​(Iterable o1,
                                                Iterable o2)
      • assertListEquals

        public static void assertListEquals​(List o1,
                                            List o2,
                                            Comparator c)
      • assertIterableEqualsIgnoreOrder

        public static void assertIterableEqualsIgnoreOrder​(Iterable i1,
                                                           Iterable i2)
      • assertZero

        public static void assertZero​(int i)
      • assertZero

        public static void assertZero​(long i)
      • assertMatchRegex

        public static void assertMatchRegex​(String message,
                                            String pattern,
                                            String result)
      • assertCausesException

        public static void assertCausesException​(Runnable r,
                                                 Class<? extends Throwable> c)