org.codenarc.test
Class TestUtil

java.lang.Object
  extended by org.codenarc.test.TestUtil
All Implemented Interfaces:
groovy.lang.GroovyObject

public class TestUtil
extends Object
implements groovy.lang.GroovyObject


Constructor Summary
TestUtil()
           
 
Method Summary
static void assertContainsAll(String text, Object strings)
           
static void assertContainsAllInOrder(String text, Object strings)
           
static void assertEqualSets(Collection collection1, Collection collection2)
           
static List<org.apache.log4j.spi.LoggingEvent> captureLog4JMessages(groovy.lang.Closure closure)
           
static String captureSystemOut(groovy.lang.Closure closure)
           
static boolean containsAll(String text, Object strings)
           
 groovy.lang.MetaClass getMetaClass()
           
 Object getProperty(String property)
           
 Object invokeMethod(String method, Object arguments)
           
 void setMetaClass(groovy.lang.MetaClass mc)
           
 void setProperty(String property, Object value)
           
static String shouldFail(Class expectedExceptionClass, groovy.lang.Closure code)
           
static String shouldFail(groovy.lang.Closure code)
           
static String shouldFailWithMessageContaining(Class expectedExceptionClass, String expectedText, groovy.lang.Closure code)
           
static void shouldFailWithMessageContaining(Object text, groovy.lang.Closure closure)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)


Copyright © 2012. All Rights Reserved.