Package gw.test
Class TestClass
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
gw.test.TestClass
- All Implemented Interfaces:
ITestWithMetadata,junit.framework.Test
- Direct Known Subclasses:
BaseRemoteTestClass,PL33465Test
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends TestClass>
junit.framework.Testprotected voidaddMetadata(Collection<TestMetadata> metadata) voidvoidafterTestMethod(Throwable possibleException) static voidassertArrayEquals(Object[] expected, Object[] got) static voidassertArrayEquals(Object[] expected, Object[] got, TestClass.EqualityTester tester) Verifies that all elements in the first array are present in the second array and match the elements in the first array.static voidassertArrayEquals(String message, byte[] expected, byte[] actual) Compare two byte arrays, first the size then each byte.static voidassertArrayEquals(String message, Object[] o1, Object[] o2) static voidassertCausesException(Runnable r, Class<? extends Throwable> c) static voidstatic voidassertCollectionEquals(Collection o1, Collection o2, Comparator c) static voidassertIterableEquals(Iterable o1, Iterable o2) static voidassertIterableEquals(Iterable o1, Iterable o2, Comparator c) static voidstatic voidassertListEquals(List o1, List o2) static voidassertListEquals(List o1, List o2, Comparator c) static voidassertMatchRegex(String message, String pattern, String result) static voidassertSetsEqual(Set o1, Set o2) static voidassertZero(int i) static voidassertZero(long i) voidvoidprotected Collection<TestMetadata> createMetadata(Annotation[] annotations) protected Collection<TestMetadata> createMetadata(List<IAnnotationInfo> annotationInfos) createMethodMetadata(String method) static TestClasscreateTestClass(IType testType) protected voidprotected TestExecutionManagerprotected StringReturns any applicable metadata for the tests in this class.getName()static IntegergetNumberOfInstancesOfTestClassCreated(String typeName) intgetType()protected voidvoidinitMetadata(String method) booleanprotected booleanprotected booleanvoidreallyRun(junit.framework.TestResult result) voidvoidrun(junit.framework.TestResult result) voidrunBare()protected final voidrunTest()voidsetExecutionManager(TestExecutionManager executionManager) voidsetGosuTest(boolean gosuTest) voidprotected final voidsetUp()protected final voidtearDown()toString()Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, run
-
Constructor Details
-
TestClass
protected TestClass() -
TestClass
-
TestClass
protected TestClass(boolean shouldInit) -
TestClass
-
-
Method Details
-
isGosuTest
public boolean isGosuTest() -
setGosuTest
public void setGosuTest(boolean gosuTest) -
initInternalData
protected void initInternalData() -
getFullClassNameInternal
-
getNumberOfInstancesOfTestClassCreated
-
setUp
- Overrides:
setUpin classjunit.framework.TestCase- Throws:
Exception
-
setExecutionManager
-
tearDown
- Overrides:
tearDownin classjunit.framework.TestCase- Throws:
Exception
-
beforeTestClass
public void beforeTestClass() -
beforeTestMethod
public void beforeTestMethod() -
afterTestMethod
-
afterTestClass
public void afterTestClass() -
run
public void run(junit.framework.TestResult result) - Specified by:
runin interfacejunit.framework.Test- Overrides:
runin classjunit.framework.TestCase
-
reallyRun
public void reallyRun(junit.framework.TestResult result) -
runBare
- Overrides:
runBarein classjunit.framework.TestCase- Throws:
Throwable
-
reallyRunBare
- Throws:
Throwable
-
toString
- Overrides:
toStringin classjunit.framework.TestCase
-
setName
- Overrides:
setNamein classjunit.framework.TestCase
-
getName
- Overrides:
getNamein classjunit.framework.TestCase
-
getExecutionManager
-
createDefaultEnvironment
-
runTest
- Overrides:
runTestin classjunit.framework.TestCase- Throws:
Throwable
-
doRunTest
- Throws:
Throwable
-
getType
-
getTypeName
-
getClassName
-
getPackageName
-
assertArrayEquals
-
assertArrayEquals
Compare two byte arrays, first the size then each byte.- Parameters:
expected-actual-
-
assertArrayEquals
public static void assertArrayEquals(Object[] expected, Object[] got, TestClass.EqualityTester tester) Verifies that all elements in the first array are present in the second array and match the elements in the first array. Uses EqualityUtil to determine equality and is order-insensitive.- Parameters:
expected- the expected result (reference)got- the obtained result (what to compare against the reference)
-
assertArrayEquals
-
assertSetsEqual
-
assertCollectionEquals
-
assertListEquals
-
assertIterableEquals
-
assertCollectionEquals
-
assertListEquals
-
assertIterableEquals
-
assertIterableEqualsIgnoreOrder
-
assertZero
public static void assertZero(int i) -
assertZero
public static void assertZero(long i) -
assertMatchRegex
-
getTotalNumTestMethods
public int getTotalNumTestMethods() -
getMetadata
Description copied from interface:ITestWithMetadataReturns any applicable metadata for the tests in this class.- Specified by:
getMetadatain interfaceITestWithMetadata- Returns:
- A list of @link{gw.test.ITestMetadata} objects, one for each test method providing metadata.
-
addMetadata
-
createMethodMetadata
-
createClassMetadata
-
createMetadata
-
isMetaAnnotationInfo
-
createMetadata
-
isMetaAnnotation
-
initMetadata
-
assertCausesException
-
createTestClass
-
_suite
-