Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Modifiers | Name | Description |
---|---|---|
static String |
TEST_SCRIPT_NAME_PREFIX |
|
protected static Logger |
log |
Type | Name and description |
---|---|
protected void |
assertArrayEquals(Object[] expected, Object[] value) Asserts that the arrays are equivalent and contain the same values |
protected void |
assertContains(char expected, char[] array) Asserts that the array of characters contains a given char |
protected void |
assertContains(int expected, int[] array) Asserts that the array of ints contains a given int |
static void |
assertEquals(String message, Object expected, Object actual) |
static void |
assertEquals(Object expected, Object actual) |
static void |
assertEquals(String expected, String actual) |
protected void |
assertInspect(Object value, String expected) Asserts that the value of inspect() on the given object matches the given text string |
protected void |
assertLength(int length, char[] array) Asserts that the array of characters has a given length |
protected void |
assertLength(int length, int[] array) Asserts that the array of ints has a given length |
protected void |
assertLength(int length, Object[] array) Asserts that the array of objects has a given length |
protected void |
assertScript(String script) see GroovyAssert.assertScript |
protected void |
assertToString(Object value, String expected) Asserts that the value of toString() on the given object matches the given text string |
protected String |
fixEOLs(String value) Returns a copy of a string in which all EOLs are \n. |
String |
getMethodName() |
String |
getName() Overload the getName() method to make the test cases look more like AgileDox (thanks to Joe Walnes for this tip!) |
protected String |
getTestClassName() |
static boolean |
notYetImplemented(Object caller) see GroovyAssert.notYetImplemented |
boolean |
notYetImplemented() Convenience method for subclasses of GroovyTestCase, identical to GroovyTestCase.notYetImplemented(this);. |
protected String |
shouldFail(Closure code) see GroovyAssert.shouldFail |
protected String |
shouldFail(Class clazz, Closure code) see GroovyAssert.shouldFail |
protected String |
shouldFail(Class clazz, String script) see GroovyAssert.shouldFail |
protected String |
shouldFail(String script) see GroovyAssert.shouldFail |
protected String |
shouldFailWithCause(Class clazz, Closure code) see GroovyAssert.shouldFailWithCause |
Asserts that the arrays are equivalent and contain the same values
Asserts that the array of characters contains a given char
expected
- expected character to be foundarray
- the arrayAsserts that the array of ints contains a given int
expected
- expected intarray
- the arrayAsserts that the value of inspect() on the given object matches the given text string
value
- the object to be output to the consoleexpected
- the expected String representationAsserts that the array of characters has a given length
length
- expected lengtharray
- the arrayAsserts that the array of ints has a given length
length
- expected lengtharray
- the arrayAsserts that the array of objects has a given length
length
- expected lengtharray
- the arrayAsserts that the value of toString() on the given object matches the given text string
value
- the object to be output to the consoleexpected
- the expected String representationOverload the getName() method to make the test cases look more like AgileDox (thanks to Joe Walnes for this tip!)
Convenience method for subclasses of GroovyTestCase, identical to
GroovyTestCase.notYetImplemented(this);.
false
when not itself already in the call stack