Package org.jboss.test.metadata.shared.support

Examples of org.jboss.test.metadata.shared.support.TestAnnotation


     
      assertNoAnnotation(metaData, TestAnnotation.class);
      assertNoAnnotation(metaData, NotPresentAnnotation.class);
      assertAllAnnotations(metaData, expectedAnnotations);
     
      TestAnnotation annotation = new TestAnnotationImpl();
      last = assertAddAnnotationNoPrevious(metaData, annotation, expectedAnnotations, last);
      assertAnnotation(metaData, TestAnnotation.class);
      assertNoAnnotation(metaData, NotPresentAnnotation.class);
      assertAllAnnotations(metaData, expectedAnnotations);
     
View Full Code Here


     
      assertNoAnnotation(metaData, TestAnnotation.class);
      assertNoAnnotation(metaData, NotPresentAnnotation.class);
      assertAllAnnotations(metaData, expectedAnnotations);
     
      TestAnnotation annotation = new TestAnnotationImpl();
      last = assertAddAnnotationNoPrevious(metaData, annotation, expectedAnnotations, last);
      assertAnnotation(metaData, TestAnnotation.class);
      assertNoAnnotation(metaData, NotPresentAnnotation.class);
      assertAllAnnotations(metaData, expectedAnnotations);
     
View Full Code Here

   {
      ExpectedAnnotations expected = emptyExpectedAnnotations();
      long last = metaData.getValidTime();
      assertNoAnnotation(metaData, TestAnnotation.class);

      TestAnnotation annotation = new TestAnnotationImpl();
      last = assertAddAnnotationNoPrevious(metaData, loader, annotation, expected, last);
      assertAnnotation(metaData, TestAnnotation.class);
     
      assertAllAnnotations(metaData, expected, local);
     
View Full Code Here

   {
      ExpectedAnnotations expected = emptyExpectedAnnotations();
      long last = metaData.getValidTime();
      assertNoAnnotation(metaData, TestAnnotation.class);

      TestAnnotation annotation1 = new TestAnnotationImpl();
      last = assertAddAnnotationNoPrevious(metaData, loader1, annotation1, expected, last);
      assertAnnotation(metaData, TestAnnotation.class);
     
      assertAllAnnotations(metaData, expected, local);

      TestAnnotation annotation2 = new TestAnnotationImpl();
      last = assertAddAnnotationWithPrevious(metaData, loader2, annotation2, last);
      assertAnnotation(metaData, TestAnnotation.class);
     
      assertAllAnnotations(metaData, expected, local);
     
View Full Code Here

   public void testAnnotations() throws Exception
   {
      ComponentMutableMetaData[] array = getArray();
      Signature[] signatures = getSignatures();
      TestAnnotation annotation = new TestAnnotationImpl();
      for(ComponentMutableMetaData cmmd : array)
      {
         for(Signature sig : signatures)
         {
            assertNull(cmmd.addAnnotation(sig, annotation));
View Full Code Here

      checkMetaDataCycle(sf, f, fi);
   }

   protected void checkAnnotationCycle(Signature signature, Member member, MemberInfo memberInfo) throws Exception
   {
      TestAnnotation annotation = new TestAnnotationImpl();
      ComponentMutableMetaData[] array = getArray();
      for(ComponentMutableMetaData cmmd : array)
      {
         assertNull(cmmd.addAnnotation(signature, annotation));
         assertSame(annotation, cmmd.removeAnnotation(member, annotation.annotationType()));
         assertNull(cmmd.addAnnotation(memberInfo, annotation));
         assertSame(annotation, cmmd.removeAnnotation(signature, annotation.annotationType()));
      }
   }
View Full Code Here

      assertTrue(item.isValid());
   }

   public void testAnnotationToMetaDataBridge() throws Exception
   {
      TestAnnotation annotation = new TestAnnotationImpl();
     
      SimpleAnnotationItem<TestAnnotation> item = new SimpleAnnotationItem<TestAnnotation>(annotation);
      AnnotationToMetaDataBridge<TestAnnotation> bridge = new AnnotationToMetaDataBridge<TestAnnotation>(item);
     
      assertEquals(annotation, bridge.getValue());
View Full Code Here

      assertTrue(item.isValid());
   }

   public void testMetaDataToAnnotationBridge() throws Exception
   {
      TestAnnotation annotation = new TestAnnotationImpl();
     
      SimpleMetaDataItem<TestAnnotation> item = new SimpleMetaDataItem<TestAnnotation>(annotation.annotationType().getName(), annotation);
      MetaDataToAnnotationBridge<TestAnnotation> bridge = new MetaDataToAnnotationBridge<TestAnnotation>(item);
     
      assertEquals(annotation, bridge.getAnnotation());
      assertEquals(annotation, bridge.getValue());
View Full Code Here

  
   public void testRestrictedAnnotation() throws Exception
   {
      MutableMetaDataLoader loader = setUpRestricted();
     
      TestAnnotation testAnnotation = new TestAnnotationImpl();
      loader.addAnnotation(testAnnotation);
      assertNotNull(loader.retrieveAnnotation(TestAnnotation.class));

      RestrictedAnnotation restrictedAnnotation = new RestrictedAnnotationImpl();
      try
View Full Code Here

TOP

Related Classes of org.jboss.test.metadata.shared.support.TestAnnotation

Copyright © 2018 www.massapicom. 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.