Package gw.test
Class TestClassHelper
- java.lang.Object
-
- gw.test.TestClassHelper
-
public class TestClassHelper extends Object
Helper methods for analyzing methods, and instantiating test classes.
-
-
Constructor Summary
Constructors Constructor Description TestClassHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends junit.framework.TestCase>
junit.framework.TestcreateTestSuite(Class<T> clazz, Iterable<String> methodNames)
static <T extends junit.framework.TestCase>
List<org.objectweb.asm.tree.MethodNode>getMethodsSorted(Class<T> clazz)
Returns list of methods according to their order in the source file.
-
-
-
Method Detail
-
getMethodsSorted
public static <T extends junit.framework.TestCase> List<org.objectweb.asm.tree.MethodNode> getMethodsSorted(Class<T> clazz)
Returns list of methods according to their order in the source file. Supertype methods go first in the list. Returns empty list if cannot find class file for the specified class. Class file is retrieved by usingClass.getResourceAsStream(java.lang.String)
so it won't work for classes generated at runtine.- Parameters:
clazz
- class to analyze- Returns:
- list of method names
-
-