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 public boolean hasTestMethods(Class<?> klass) { 13 Method[] methods = klass.getMethods(); 14 for(Method m:methods) { 15 if (m.isAnnotationPresent(Test.class)) { 16 return true; 17 } 18 } 19 return false; 20 } 21 } 22