protected List<JUnit4TestMethod> getTestMethods() throws Exception { final Collection<JUnit4ConfigMethod> configMethods = getConfigurationMethods(); final List<JUnit4TestMethod> methods = new ArrayList<JUnit4TestMethod>(); final Collection<Method> testMethods = m_testClass.getAnnotatedMethods( Test.class ); for( Method testMethod : testMethods ) { final Option configOptions = getOptions( testMethod, configMethods ); final FrameworkOption[] frameworkOptions = OptionUtils.filter( FrameworkOption.class, configOptions ); final Option[] filteredOptions = OptionUtils.remove( FrameworkOption.class, configOptions ); if( frameworkOptions.length == 0 ) { methods.add( new JUnit4TestMethod( testMethod, m_testClass, null, filteredOptions ) ); } else { for( FrameworkOption frameworkOption : frameworkOptions ) { methods.add( new JUnit4TestMethod( testMethod, m_testClass, frameworkOption, filteredOptions ) ); } } } return methods; }
return combine( remove( ProvisionOption.class, options ), processed.toArray( new Option[processed.size()] ) );