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

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


   }

   protected void testEmpty(MetaData metaData) throws Exception
   {
      assertNotNull(metaData);
      ExpectedAnnotations expectedAnnotations = emptyExpectedAnnotations();

      assertNoAnnotation(metaData, NotPresentAnnotation.class);
     
      assertAllAnnotations(metaData, expectedAnnotations, local);
   }
View Full Code Here


   protected void testTestAnnotation(MetaData metaData) throws Exception
   {
      assertNotNull(metaData);

      ExpectedAnnotations expectedAnnotations = emptyExpectedAnnotations();

      assertAnnotation(metaData, TestAnnotation.class);
      assertNoAnnotation(metaData, NotPresentAnnotation.class);
     
      expectedAnnotations.add(TestAnnotation.class);
      assertAllAnnotations(metaData, expectedAnnotations, local);
   }
View Full Code Here

   protected void testTestAnnotation12(MetaData metaData) throws Exception
   {
      assertNotNull(metaData);

      ExpectedAnnotations expectedAnnotations = emptyExpectedAnnotations();
     
      assertAnnotation(metaData, TestAnnotation1.class);
      assertAnnotation(metaData, TestAnnotation2.class);
      assertNoAnnotation(metaData, NotPresentAnnotation.class);
     
      expectedAnnotations.add(TestAnnotation1.class);
      expectedAnnotations.add(TestAnnotation2.class);
      assertAllAnnotations(metaData, expectedAnnotations, local);
   }
View Full Code Here

   }
  
   public void testEmpty() throws Exception
   {
      MetaData metaData = setupEmpty();
      ExpectedAnnotations expectedAnnotations = emptyExpectedAnnotations();

      assertNoAnnotation(metaData, NotPresentAnnotation.class);
     
      assertAllAnnotations(metaData, expectedAnnotations, local);
   }
View Full Code Here

   protected abstract MetaData setupEmpty();
  
   public void testTestAnnotation() throws Exception
   {
      MetaData metaData = setupTestAnnotation();
      ExpectedAnnotations expectedAnnotations = emptyExpectedAnnotations();

      assertAnnotation(metaData, TestAnnotation.class);
      assertNoAnnotation(metaData, NotPresentAnnotation.class);
     
      expectedAnnotations.add(TestAnnotation.class);
      assertAllAnnotations(metaData, expectedAnnotations, local);
   }
View Full Code Here

   protected abstract MetaData setupTestAnnotation();
  
   public void testTestAnnotation12() throws Exception
   {
      MetaData metaData = setupTestAnnotation12();
      ExpectedAnnotations expectedAnnotations = emptyExpectedAnnotations();
     
      assertAnnotation(metaData, TestAnnotation1.class);
      assertAnnotation(metaData, TestAnnotation2.class);
      assertNoAnnotation(metaData, NotPresentAnnotation.class);
     
      expectedAnnotations.add(TestAnnotation1.class);
      expectedAnnotations.add(TestAnnotation2.class);
      assertAllAnnotations(metaData, expectedAnnotations, local);
   }
View Full Code Here

    *
    * @return the empty expected annotations
    */
   protected ExpectedAnnotations emptyExpectedAnnotations()
   {
      return new ExpectedAnnotations();
   }
View Full Code Here

      assertNotNull(metaData);
      assertNotNull(expected);
     
      Annotation[] result = metaData.getAnnotations();
      assertNotNull("Null result", result);
      ExpectedAnnotations actual = emptyExpectedAnnotations();
      for (Annotation annotation : result)
      {
         assertNotNull("Null annotation " + Arrays.asList(result), annotation);
         actual.add(annotation.annotationType());
      }
     
      assertExpectedAnnotations("Annotations", expected, actual);
   }
View Full Code Here

      assertNotNull(metaData);
      assertNotNull(expected);
     
      Annotation[] result = metaData.getLocalAnnotations();
      assertNotNull("Null result", result);
      ExpectedAnnotations actual = emptyExpectedAnnotations();
      for (Annotation annotation : result)
      {
         assertNotNull("Null annotation " + Arrays.asList(result), annotation);
         actual.add(annotation.annotationType());
      }
     
      assertExpectedAnnotations("Annotations", expected, actual);
   }
View Full Code Here

     
      AnnotationsItem result = metaData.retrieveAnnotations();
      assertNotNull("Null result", result);
      AnnotationItem<? extends Annotation>[] items = result.getAnnotations();
      assertNotNull("Null items", items);
      ExpectedAnnotations actual = emptyExpectedAnnotations();
      for (AnnotationItem<? extends Annotation> item : items)
      {
         assertNotNull("Null annotation item " + Arrays.asList(items), item);
         Annotation annotation = item.getAnnotation();
         assertNotNull("Null annotation " + Arrays.asList(items), annotation);
         actual.add(annotation.annotationType());
      }
     
      assertExpectedAnnotations("Annotations", expected, actual);
   }
View Full Code Here

TOP

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

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.