Package groovy.util
Class GroovyTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
groovy.util.GroovyTestCase
- All Implemented Interfaces:
junit.framework.Test
@Deprecated public class GroovyTestCase extends junit.framework.TestCase
Deprecated.
A JUnit 3
TestCase base class in Groovy.
In case JUnit 4 is used, see GroovyAssert.- See Also:
GroovyAssert
-
Field Summary
Fields Modifier and Type Field Description protected static LoggerlogDeprecated.static StringTEST_SCRIPT_NAME_PREFIXDeprecated. -
Constructor Summary
Constructors Constructor Description GroovyTestCase()Deprecated. -
Method Summary
Modifier and Type Method Description protected voidassertArrayEquals(Object[] expected, Object[] value)Deprecated.Asserts that the arrays are equivalent and contain the same valuesprotected voidassertContains(char expected, char[] array)Deprecated.Asserts that the array of characters contains a given charprotected voidassertContains(int expected, int[] array)Deprecated.Asserts that the array of ints contains a given intstatic voidassertEquals(Object expected, Object actual)Deprecated.static voidassertEquals(String message, Object expected, Object actual)Deprecated.static voidassertEquals(String expected, String actual)Deprecated.protected voidassertInspect(Object value, String expected)Deprecated.Asserts that the value of inspect() on the given object matches the given text stringprotected voidassertLength(int length, char[] array)Deprecated.Asserts that the array of characters has a given lengthprotected voidassertLength(int length, int[] array)Deprecated.Asserts that the array of ints has a given lengthprotected voidassertLength(int length, Object[] array)Deprecated.Asserts that the array of objects has a given lengthprotected voidassertScript(String script)Deprecated.protected voidassertToString(Object value, String expected)Deprecated.Asserts that the value of toString() on the given object matches the given text stringprotected StringfixEOLs(String value)Deprecated.Returns a copy of a string in which all EOLs are \n.StringgetMethodName()Deprecated.StringgetName()Deprecated.Overload the getName() method to make the test cases look more like AgileDox (thanks to Joe Walnes for this tip!)protected StringgetTestClassName()Deprecated.booleannotYetImplemented()Deprecated.Convenience method for subclasses of GroovyTestCase, identical tostatic booleannotYetImplemented(Object caller)Deprecated.protected StringshouldFail(Closure code)Deprecated.protected StringshouldFail(Class clazz, Closure code)Deprecated.protected StringshouldFail(Class clazz, String script)Deprecated.protected StringshouldFail(String script)Deprecated.protected StringshouldFailWithCause(Class clazz, Closure code)Deprecated.Methods inherited from class junit.framework.TestCase
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, toString
-
Field Details
-
log
Deprecated. -
TEST_SCRIPT_NAME_PREFIX
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Details
-
GroovyTestCase
public GroovyTestCase()Deprecated.
-
-
Method Details
-
getName
Deprecated.Overload the getName() method to make the test cases look more like AgileDox (thanks to Joe Walnes for this tip!)- Overrides:
getNamein classjunit.framework.TestCase
-
getMethodName
Deprecated. -
assertArrayEquals
Deprecated.Asserts that the arrays are equivalent and contain the same values- Parameters:
expected-value-
-
assertLength
protected void assertLength(int length, char[] array)Deprecated.Asserts that the array of characters has a given length- Parameters:
length- expected lengtharray- the array
-
assertLength
protected void assertLength(int length, int[] array)Deprecated.Asserts that the array of ints has a given length- Parameters:
length- expected lengtharray- the array
-
assertLength
Deprecated.Asserts that the array of objects has a given length- Parameters:
length- expected lengtharray- the array
-
assertContains
protected void assertContains(char expected, char[] array)Deprecated.Asserts that the array of characters contains a given char- Parameters:
expected- expected character to be foundarray- the array
-
assertContains
protected void assertContains(int expected, int[] array)Deprecated.Asserts that the array of ints contains a given int- Parameters:
expected- expected intarray- the array
-
assertToString
Deprecated.Asserts that the value of toString() on the given object matches the given text string- Parameters:
value- the object to be output to the consoleexpected- the expected String representation
-
assertInspect
Deprecated.Asserts that the value of inspect() on the given object matches the given text string- Parameters:
value- the object to be output to the consoleexpected- the expected String representation
-
assertScript
Deprecated.- Throws:
Exception
-
getTestClassName
Deprecated. -
shouldFail
Deprecated. -
shouldFail
Deprecated. -
shouldFailWithCause
Deprecated. -
shouldFail
Deprecated. -
shouldFail
Deprecated. -
fixEOLs
Deprecated.Returns a copy of a string in which all EOLs are \n. -
notYetImplemented
Deprecated. -
notYetImplemented
public boolean notYetImplemented()Deprecated.Convenience method for subclasses of GroovyTestCase, identical toGroovyTestCase.notYetImplemented(this);
.- Returns:
falsewhen not itself already in the call stack- See Also:
notYetImplemented(java.lang.Object)
-
assertEquals
Deprecated. -
assertEquals
Deprecated. -
assertEquals
Deprecated.
-