List of usage examples for junit.framework Test getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.jahia.bin.TestServlet.java
private List<Class> getTestClasses(Test test, List<Class> classes) { if (test instanceof TestSuite) { // if there is a suite method available, then try // to extract the suite from it. If there is an error // here it will be caught below and reported. Set<Class> tempClasses = new HashSet<Class>(); for (Enumeration<Test> tests = ((TestSuite) test).tests(); tests.hasMoreElements();) { Test currentTest = tests.nextElement(); if (currentTest instanceof TestSuite || !tempClasses.contains(currentTest.getClass())) { classes = getTestClasses(currentTest, classes); tempClasses.add(currentTest.getClass()); }//from w w w . j ava 2 s. c o m } } else { classes.add(test.getClass()); } return classes; }
From source file:org.jahia.test.bin.TestServlet.java
private List<Class<?>> getTestClasses(Test test, List<Class<?>> classes) { if (test instanceof TestSuite) { // if there is a suite method available, then try // to extract the suite from it. If there is an error // here it will be caught below and reported. Set<Class<?>> tempClasses = new HashSet<Class<?>>(); for (Enumeration<Test> tests = ((TestSuite) test).tests(); tests.hasMoreElements();) { Test currentTest = tests.nextElement(); if (currentTest instanceof TestSuite || !tempClasses.contains(currentTest.getClass())) { classes = getTestClasses(currentTest, classes); tempClasses.add(currentTest.getClass()); }// w w w. j ava 2 s .c o m } } else { classes.add(test.getClass()); } return classes; }