Class TestUtil

  • All Implemented Interfaces:
    groovy.lang.GroovyObject

    public class TestUtil
    extends Object
    implements groovy.lang.GroovyObject
    • Constructor Detail

      • TestUtil

        public TestUtil()
    • Method Detail

      • getMetaClass

        public groovy.lang.MetaClass getMetaClass()
        Specified by:
        getMetaClass in interface groovy.lang.GroovyObject
      • setMetaClass

        public void setMetaClass​(groovy.lang.MetaClass mc)
        Specified by:
        setMetaClass in interface groovy.lang.GroovyObject
      • invokeMethod

        public Object invokeMethod​(String method,
                                   Object arguments)
        Specified by:
        invokeMethod in interface groovy.lang.GroovyObject
      • getProperty

        public Object getProperty​(String property)
        Specified by:
        getProperty in interface groovy.lang.GroovyObject
      • setProperty

        public void setProperty​(String property,
                                Object value)
        Specified by:
        setProperty in interface groovy.lang.GroovyObject
      • shouldFail

        public static String shouldFail​(Class expectedExceptionClass,
                                        groovy.lang.Closure code)
      • shouldFail

        public static String shouldFail​(groovy.lang.Closure code)
      • shouldFailWithMessageContaining

        public static String shouldFailWithMessageContaining​(Class expectedExceptionClass,
                                                             String expectedText,
                                                             groovy.lang.Closure code)
      • shouldFailWithMessageContaining

        public static void shouldFailWithMessageContaining​(Object text,
                                                           groovy.lang.Closure closure)
      • containsAll

        public static boolean containsAll​(String text,
                                          Object strings)
      • assertContainsAll

        public static void assertContainsAll​(String text,
                                             Object strings)
      • assertContainsAllInOrder

        public static void assertContainsAllInOrder​(String text,
                                                    Object strings)
      • assertEqualSets

        public static void assertEqualSets​(Collection collection1,
                                           Collection collection2)
      • captureSystemOut

        public static String captureSystemOut​(groovy.lang.Closure closure)
      • captureLog4JMessages

        public static List<org.apache.log4j.spi.LoggingEvent> captureLog4JMessages​(groovy.lang.Closure closure)