Examples of MyAnnotation


Examples of com.getperka.flatpack.codex.AnnotationCodexTest.MyAnnotation

  @Inject
  private Unpacker unpacker;

  @Test
  public void test() {
    MyAnnotation a = getClass().getAnnotation(MyAnnotation.class);
    MyAnnotation a2 = (MyAnnotation) testCodex(codex, a);
    assertEquals(a2, a2);
    assertEquals(a2, a);
    assertEquals(a, a2);
    assertEquals(5, a2.i());
    assertEquals(1, a2.j());
    assertEquals(2, a2.k()[0]);
    assertEquals(3, a2.k()[1]);

    OtherAnnotation o = getClass().getAnnotation(OtherAnnotation.class);
    OtherAnnotation o2 = (OtherAnnotation) testCodex(codex, o);
    assertEquals(o2, o2);
    assertEquals(o, o2);
View Full Code Here

Examples of com.opensymphony.xwork2.util.annotation.MyAnnotation

        ans = AnnotationUtils.getAnnotatedMethods(DummyClassExt.class, MyAnnotation.class, MyAnnotation2.class);
        assertEquals(2, ans.size());
    }

    public void testFindAnnotationOnClass() {
        MyAnnotation a1 = AnnotationUtils.findAnnotation(DummyClass.class, MyAnnotation.class);
        assertNotNull(a1);
        assertEquals("class-test", a1.value());
    }
View Full Code Here

Examples of com.opensymphony.xwork2.util.annotation.MyAnnotation

        assertNotNull(a1);
        assertEquals("class-test", a1.value());
    }

    public void testFindAnnotationOnPackage() {
        MyAnnotation ns = AnnotationUtils.findAnnotation(Dummy2Class.class, MyAnnotation.class);
        assertNotNull(ns);
        assertEquals("package-test", ns.value());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.