Search in sources :

Example 21 with TestMethod

use of android.test.suitebuilder.TestMethod in project android_frameworks_base by crdroidandroid.

the class HasClassAnnotationTest method classHasAnnotation.

private boolean classHasAnnotation(Class<? extends TestCase> aClass, Class<Smoke> expectedClassification) throws NoSuchMethodException {
    Method method = aClass.getMethod("testSomeTest");
    TestMethod testMethod = new TestMethod(method, aClass);
    return new HasClassAnnotation(expectedClassification).apply(testMethod);
}
Also used : TestMethod(android.test.suitebuilder.TestMethod) Method(java.lang.reflect.Method) TestMethod(android.test.suitebuilder.TestMethod)

Aggregations

TestMethod (android.test.suitebuilder.TestMethod)21 Method (java.lang.reflect.Method)15 TestSuiteBuilder (android.test.suitebuilder.TestSuiteBuilder)5 TestSuite (junit.framework.TestSuite)5 HasAnnotation (android.test.suitebuilder.annotation.HasAnnotation)1 Predicate (com.android.internal.util.Predicate)1 BrokenTest (dalvik.annotation.BrokenTest)1 SideEffect (dalvik.annotation.SideEffect)1