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 java.util.logging.Logger
log
Deprecated.static java.lang.String
TEST_SCRIPT_NAME_PREFIX
Deprecated. -
Constructor Summary
Constructors Constructor Description GroovyTestCase()
Deprecated. -
Method Summary
Modifier and Type Method Description protected void
assertArrayEquals(java.lang.Object[] expected, java.lang.Object[] value)
Deprecated.Asserts that the arrays are equivalent and contain the same valuesprotected void
assertContains(char expected, char[] array)
Deprecated.Asserts that the array of characters contains a given charprotected void
assertContains(int expected, int[] array)
Deprecated.Asserts that the array of ints contains a given intstatic void
assertEquals(java.lang.Object expected, java.lang.Object actual)
Deprecated.static void
assertEquals(java.lang.String message, java.lang.Object expected, java.lang.Object actual)
Deprecated.static void
assertEquals(java.lang.String expected, java.lang.String actual)
Deprecated.protected void
assertInspect(java.lang.Object value, java.lang.String expected)
Deprecated.Asserts that the value of inspect() on the given object matches the given text stringprotected void
assertLength(int length, char[] array)
Deprecated.Asserts that the array of characters has a given lengthprotected void
assertLength(int length, int[] array)
Deprecated.Asserts that the array of ints has a given lengthprotected void
assertLength(int length, java.lang.Object[] array)
Deprecated.Asserts that the array of objects has a given lengthprotected void
assertScript(java.lang.String script)
Deprecated.protected void
assertToString(java.lang.Object value, java.lang.String expected)
Deprecated.Asserts that the value of toString() on the given object matches the given text stringprotected java.lang.String
fixEOLs(java.lang.String value)
Deprecated.Returns a copy of a string in which all EOLs are \n.java.lang.String
getMethodName()
Deprecated.java.lang.String
getName()
Deprecated.Overload the getName() method to make the test cases look more like AgileDox (thanks to Joe Walnes for this tip!)protected java.lang.String
getTestClassName()
Deprecated.boolean
notYetImplemented()
Deprecated.Convenience method for subclasses of GroovyTestCase, identical tostatic boolean
notYetImplemented(java.lang.Object caller)
Deprecated.protected java.lang.String
shouldFail(Closure code)
Deprecated.protected java.lang.String
shouldFail(java.lang.Class clazz, Closure code)
Deprecated.protected java.lang.String
shouldFail(java.lang.Class clazz, java.lang.String script)
Deprecated.protected java.lang.String
shouldFail(java.lang.String script)
Deprecated.protected java.lang.String
shouldFailWithCause(java.lang.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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
log
protected static java.util.logging.Logger logDeprecated. -
TEST_SCRIPT_NAME_PREFIX
public static final java.lang.String TEST_SCRIPT_NAME_PREFIXDeprecated.- See Also:
- Constant Field Values
-
-
Constructor Details
-
GroovyTestCase
public GroovyTestCase()Deprecated.
-
-
Method Details
-
getName
public java.lang.String getName()Deprecated.Overload the getName() method to make the test cases look more like AgileDox (thanks to Joe Walnes for this tip!)- Overrides:
getName
in classjunit.framework.TestCase
-
getMethodName
public java.lang.String getMethodName()Deprecated. -
assertArrayEquals
protected void assertArrayEquals(java.lang.Object[] expected, java.lang.Object[] value)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
protected void assertLength(int length, java.lang.Object[] array)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
protected void assertToString(java.lang.Object value, java.lang.String expected)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
protected void assertInspect(java.lang.Object value, java.lang.String expected)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
protected void assertScript(java.lang.String script) throws java.lang.ExceptionDeprecated.- Throws:
java.lang.Exception
-
getTestClassName
protected java.lang.String getTestClassName()Deprecated. -
shouldFail
Deprecated. -
shouldFail
Deprecated. -
shouldFailWithCause
Deprecated. -
shouldFail
protected java.lang.String shouldFail(java.lang.Class clazz, java.lang.String script)Deprecated. -
shouldFail
protected java.lang.String shouldFail(java.lang.String script)Deprecated. -
fixEOLs
protected java.lang.String fixEOLs(java.lang.String value)Deprecated.Returns a copy of a string in which all EOLs are \n. -
notYetImplemented
public static boolean notYetImplemented(java.lang.Object caller)Deprecated. -
notYetImplemented
public boolean notYetImplemented()Deprecated.Convenience method for subclasses of GroovyTestCase, identical toGroovyTestCase.notYetImplemented(this);
.- Returns:
false
when not itself already in the call stack- See Also:
notYetImplemented(java.lang.Object)
-
assertEquals
public static void assertEquals(java.lang.String message, java.lang.Object expected, java.lang.Object actual)Deprecated. -
assertEquals
public static void assertEquals(java.lang.Object expected, java.lang.Object actual)Deprecated. -
assertEquals
public static void assertEquals(java.lang.String expected, java.lang.String actual)Deprecated.
-