|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--groovy.util.GroovyTestCase
A default JUnit TestCase in Groovy. This provides a number of helper methods plus avoids the JUnit restriction of requiring all test* methods to be void return type.
Constructor Summary | |
GroovyTestCase()
|
Method Summary | |
protected void |
assertArrayEquals(Object[] expected,
Object[] value)
|
protected void |
assertConsoleOutput(Object value,
String expected)
Asserts that the console output of the given object matches the given text string |
protected void |
assertContains(char expected,
char[] array)
|
protected void |
assertContains(int expected,
int[] array)
|
protected void |
assertLength(int length,
char[] array)
|
protected void |
assertLength(int length,
int[] array)
|
protected void |
assertLength(int length,
Object[] array)
|
protected void |
shouldFail(groovy.lang.Closure code)
Asserts that the given code closure fails when it is evaluated |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GroovyTestCase()
Method Detail |
protected void assertArrayEquals(Object[] expected, Object[] value)
protected void assertLength(int length, char[] array)
protected void assertLength(int length, int[] array)
protected void assertLength(int length, Object[] array)
protected void assertContains(char expected, char[] array)
protected void assertContains(int expected, int[] array)
protected void assertConsoleOutput(Object value, String expected)
value
- the object to be output to the consoleexpected
- the expected String representationprotected void shouldFail(groovy.lang.Closure code)
code
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |