Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Declaring Annotations

sorry, the previous one was almost unreadable, don't know why,

/**
* An annotation is added via the AnnotatorAspect, so
* after the weaving phase, the annotation should be there.
*
*
* @throws NoSuchInterfaceException
*
*/
public void testDeclareAnnotation() throws NoSuchInterfaceException{

   Pusher p = (Pusher) fComponentNoDelegators.getFcInterface("m");
   Method[] annotatedMethods = p.getClass().getDeclaredMethods();
//every method on the pusher interface should be annotated
   for (Method m :annotatedMethods){
       //get declared annotations
       Annotation [] annots = m.getDeclaredAnnotations();
       assertNotNull(annots);
       assertTrue(annots.length != 0);
   }


Valerio Schiavoni ha scritto:

Hello Adrian,

i corrected the test case, so that it tests if *methods* are annotated.
http://veleno.pastebin.com/311834

and now i get an assertion failed..




Back to the top