@Deprecated public class GroovyTestCase extends junit.framework.TestCase
TestCase base class in Groovy.
In case JUnit 4 is used, see GroovyAssert.GroovyAssert| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
log
Deprecated.
|
static String |
TEST_SCRIPT_NAME_PREFIX
Deprecated.
|
| Constructor and Description |
|---|
GroovyTestCase()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertArrayEquals(Object[] expected,
Object[] value)
Deprecated.
Asserts that the arrays are equivalent and contain the same values
|
protected void |
assertContains(char expected,
char[] array)
Deprecated.
Asserts that the array of characters contains a given char
|
protected void |
assertContains(int expected,
int[] array)
Deprecated.
Asserts that the array of ints contains a given int
|
static void |
assertEquals(Object expected,
Object actual)
Deprecated.
|
static void |
assertEquals(String message,
Object expected,
Object actual)
Deprecated.
|
static void |
assertEquals(String expected,
String actual)
Deprecated.
|
protected void |
assertInspect(Object value,
String expected)
Deprecated.
Asserts that the value of inspect() on the given object matches the
given text string
|
protected void |
assertLength(int length,
char[] array)
Deprecated.
Asserts that the array of characters has a given length
|
protected void |
assertLength(int length,
int[] array)
Deprecated.
Asserts that the array of ints has a given length
|
protected void |
assertLength(int length,
Object[] array)
Deprecated.
Asserts that the array of objects has a given length
|
protected void |
assertScript(String script)
Deprecated.
|
protected void |
assertToString(Object value,
String expected)
Deprecated.
Asserts that the value of toString() on the given object matches the
given text string
|
protected String |
fixEOLs(String value)
Deprecated.
Returns a copy of a string in which all EOLs are \n.
|
String |
getMethodName()
Deprecated.
|
String |
getName()
Deprecated.
Overload the getName() method to make the test cases look more like AgileDox
(thanks to Joe Walnes for this tip!)
|
protected String |
getTestClassName()
Deprecated.
|
boolean |
notYetImplemented()
Deprecated.
Convenience method for subclasses of GroovyTestCase, identical to
|
static boolean |
notYetImplemented(Object caller)
Deprecated.
|
protected String |
shouldFail(Class clazz,
groovy.lang.Closure code)
Deprecated.
|
protected String |
shouldFail(Class clazz,
String script)
Deprecated.
|
protected String |
shouldFail(groovy.lang.Closure code)
Deprecated.
|
protected String |
shouldFail(String script)
Deprecated.
|
protected String |
shouldFailWithCause(Class clazz,
groovy.lang.Closure code)
Deprecated.
|
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, run, run, runBare, runTest, setName, setUp, tearDown, toStringprotected static Logger log
public static final String TEST_SCRIPT_NAME_PREFIX
public String getName()
getName in class junit.framework.TestCasepublic String getMethodName()
protected void assertArrayEquals(Object[] expected, Object[] value)
expected - value - protected void assertLength(int length,
char[] array)
length - expected lengtharray - the arrayprotected void assertLength(int length,
int[] array)
length - expected lengtharray - the arrayprotected void assertLength(int length,
Object[] array)
length - expected lengtharray - the arrayprotected void assertContains(char expected,
char[] array)
expected - expected character to be foundarray - the arrayprotected void assertContains(int expected,
int[] array)
expected - expected intarray - the arrayprotected void assertToString(Object value, String expected)
value - the object to be output to the consoleexpected - the expected String representationprotected void assertInspect(Object value, String expected)
value - the object to be output to the consoleexpected - the expected String representationprotected void assertScript(String script) throws Exception
Exceptionprotected String getTestClassName()
protected String shouldFail(groovy.lang.Closure code)
protected String shouldFailWithCause(Class clazz, groovy.lang.Closure code)
protected String fixEOLs(String value)
public static boolean notYetImplemented(Object caller)
public boolean notYetImplemented()
GroovyTestCase.notYetImplemented(this);.
false when not itself already in the call stacknotYetImplemented(java.lang.Object)public static void assertEquals(String message, Object expected, Object actual)