HasMethodAnnotationTestpublic class HasMethodAnnotationTest extends TestCase
Methods Summary |
---|
private boolean | methodHasAnnotation(java.lang.Class aClass, java.lang.String methodName, java.lang.Class expectedClassification)
Method method = aClass.getMethod(methodName);
TestMethod testMethod = new TestMethod(method, aClass);
return new HasMethodAnnotation(expectedClassification).apply(testMethod);
| public void | testMethodWithSpecifiedAttribute()
assertTrue(methodHasAnnotation(AnnotatedMethodExample.class,
"testThatIsAnnotated", Smoke.class));
| public void | testMethodWithoutSpecifiedAttribute()
assertFalse(methodHasAnnotation(AnnotatedMethodExample.class,
"testThatIsNotAnnotated", Smoke.class));
|
|