/*
 * Copyright 2015 the original author or authors.
 *
 * All rights reserved. This program and the accompanying materials are
 * made available under the terms of the Eclipse Public License v1.0 which
 * accompanies this distribution and is available at
 *
 * http://www.eclipse.org/legal/epl-v10.html
 */

package org.junit.gen5.engine.junit5.descriptor;

import java.util.Arrays;

import org.junit.gen5.api.Test;
import org.junit.gen5.commons.util.AnnotationUtils;

/**
 * @since 5.0
 */
class TestClassTester extends ReflectionObjectTester {

	private final TestMethodTester methodTester = new TestMethodTester();

	boolean accept(Class<?> testClassCandidate) {
		if (isAbstract(testClassCandidate))
			return false;
		if (testClassCandidate.isLocalClass())
			return false;
		return hasTestMethods(testClassCandidate);
	}

	private boolean hasTestMethods(Class<?> testClassCandidate) {
		return !AnnotationUtils.findAnnotatedMethods(testClassCandidate, Test.class).isEmpty();
	}

}

@@ -356,34 +356,8 @@
 r;%0A%0A
-import java.util.Arrays;%0A%0A
 impo
@@ -519,80 +519,8 @@
  %7B%0A%0A
-%09private final TestMethodTester methodTester = new TestMethodTester();%0A%0A
 %09boo

Clean up warnings