Methods Summary |
---|
private boolean | hasExampleAnnotation(java.lang.Class aClass, java.lang.String methodName)
Method method = aClass.getMethod(methodName);
TestMethod testMethod = new TestMethod(method, aClass);
return new HasAnnotation(Example.class).apply(testMethod);
|
public void | testThatClassAnnotatioCausesAllMethodsToBeReportedAsBeingAnnotated()
assertTrue(hasExampleAnnotation(ClassWithAnnotation.class, "testWithoutAnnotation"));
|
public void | testThatMethodWithAnnotationIsReportedAsBeingAnnotated()
assertTrue(hasExampleAnnotation(ClassWithAnnotation.class, "testWithAnnotation"));
assertTrue(hasExampleAnnotation(ClassWithoutAnnotation.class, "testWithAnnotation"));
|
public void | testThatMethodWithOutAnnotationIsNotReportedAsBeingAnnotated()
assertFalse(hasExampleAnnotation(ClassWithoutAnnotation.class, "testWithoutAnnotation"));
|