Examples of TestAnnotation


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

   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

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

      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

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

      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

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

      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

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

  
   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

Examples of org.jboss.test.metatype.values.factory.support.TestAnnotation

      compositeType.freeze();

      String[] compositeNames = { "something" };
      CompositeValue expected = new CompositeValueSupport(compositeType, compositeNames, new MetaValue[] { SimpleValueSupport.wrap("Hello") });
     
      TestAnnotation annotation = getClass().getAnnotation(TestAnnotation.class);
      MetaValue result = createMetaValue(annotation);
      CompositeValue actual = assertInstanceOf(result, CompositeValue.class);
      getLog().debug("Annotation Value: " + actual);
      assertEquals(expected, actual);
   }
View Full Code Here

Examples of org.testng.internal.annotations.TestAnnotation

   {
      if (testAnnotation.getDataProviderClass() == null)
      {
         if (testAnnotation instanceof TestAnnotation)
         {
            TestAnnotation annoation = (TestAnnotation) testAnnotation;
            annoation.setDataProviderClass(TestEnricherDataProvider.class);
            annoation.setDataProvider(TestEnricherDataProvider.PROVIDER_NAME);
         }
      }
   }
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.