* @return A set containing the classes to be compiled for this test
*/
private Set<Class<?>> getTestClasses() {
Set<Class<?>> testClasses = new HashSet<Class<?>>();
WithClasses withClasses = method.getAnnotation( WithClasses.class );
if ( withClasses != null ) {
testClasses.addAll( Arrays.asList( withClasses.value() ) );
}
withClasses = method.getMethod().getDeclaringClass().getAnnotation( WithClasses.class );
if ( withClasses != null ) {
testClasses.addAll( Arrays.asList( withClasses.value() ) );
}
if ( testClasses.isEmpty() ) {
throw new IllegalStateException(
"The classes to be compiled during the test must be specified via @WithClasses."