1 /* 2 * Copyright (c) 2007 Mockito contributors 3 * This program is made available under the terms of the MIT License. 4 */ 5 package org.mockito.internal.runners.util; 6 7 import org.junit.Test; 8 9 import java.lang.reflect.Method; 10 11 public class TestMethodsFinder { 12 13 private TestMethodsFinder() {} 14 15 public static boolean hasTestMethods(Class<?> klass) { 16 Method[] methods = klass.getMethods(); 17 for(Method m:methods) { 18 if (m.isAnnotationPresent(Test.class)) { 19 return true; 20 } 21 } 22 return false; 23 } 24 } 25