Package org.jboss.test.xb.builder.object.mc.support.model

Examples of org.jboss.test.xb.builder.object.mc.support.model.ConstructorMetaData


public class AnnotationTestCase extends AbstractMCTest
{
   protected AbstractAnnotationMetaData getAnnotation() throws Exception
   {
      AbstractBeanMetaData bean = unmarshalBean();
      ConstructorMetaData constructor = bean.getConstructor();
      assertNotNull(constructor);
      Set<?> annotations = constructor.getAnnotations();
      assertEquals(1, annotations.size());
      AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) annotations.iterator().next();
      assertNotNull(annotation);
      return annotation;
   }
View Full Code Here


public class ConstructorTestCase extends AbstractMCTest
{
   protected ConstructorMetaData getConstructor() throws Exception
   {
      AbstractBeanMetaData bean = unmarshalBean();
      ConstructorMetaData constructor = bean.getConstructor();
      assertNotNull(constructor);
      return constructor;
   }
View Full Code Here

      return constructor;
   }

   public void testConstructor() throws Exception
   {
      ConstructorMetaData constructor = getConstructor();
      assertNull(constructor.getFactoryClass());
      assertNull(constructor.getFactoryMethod());
      assertNull(constructor.getAnnotations());
      assertNull(constructor.getFactory());
      assertNull(constructor.getParameters());
      assertNull(constructor.getValue());
   }
View Full Code Here

      assertNull(constructor.getValue());
   }

   public void testConstructorWithBean() throws Exception
   {
      ConstructorMetaData constructor = getConstructor();
      assertNull(constructor.getFactoryClass());
      assertNull(constructor.getFactoryMethod());
      assertNull(constructor.getAnnotations());
      assertNull(constructor.getFactory());
      assertNull(constructor.getParameters());
      assertNotNull(constructor.getValue());
      assertTrue(constructor.getValue() instanceof BeanMetaData);
   }
View Full Code Here

      assertTrue(constructor.getValue() instanceof BeanMetaData);
   }

   public void testConstructorWithFactoryClass() throws Exception
   {
      ConstructorMetaData constructor = getConstructor();
      assertEquals("FactoryClass", constructor.getFactoryClass());
      assertEquals("Dummy", constructor.getFactoryMethod());
      assertNull(constructor.getAnnotations());
      assertNull(constructor.getFactory());
      assertNull(constructor.getParameters());
      assertNull(constructor.getValue());
   }
View Full Code Here

      assertNull(constructor.getValue());
   }

   public void testConstructorWithFactoryMethod() throws Exception
   {
      ConstructorMetaData constructor = getConstructor();
      assertEquals("Dummy", constructor.getFactoryClass());
      assertEquals("FactoryMethod", constructor.getFactoryMethod());
      assertNull(constructor.getAnnotations());
      assertNull(constructor.getFactory());
      assertNull(constructor.getParameters());
      assertNull(constructor.getValue());
   }
View Full Code Here

      assertNull(constructor.getValue());
   }

   public void testConstructorWithAnnotation() throws Exception
   {
      ConstructorMetaData constructor = getConstructor();
      assertNull(constructor.getFactoryClass());
      assertNull(constructor.getFactoryMethod());
      HashSet<String> expected = new HashSet<String>();
      expected.add("@" + Annotation1.class.getName());
      assertAnnotations(expected, constructor.getAnnotations());
      assertNull(constructor.getFactory());
      assertNull(constructor.getParameters());
      assertNull(constructor.getValue());
   }
View Full Code Here

      assertNull(constructor.getValue());
   }

   public void testConstructorWithAnnotations() throws Exception
   {
      ConstructorMetaData constructor = getConstructor();
      assertNull(constructor.getFactoryClass());
      assertNull(constructor.getFactoryMethod());
      HashSet<String> expected = new HashSet<String>();
      expected.add("@" + Annotation1.class.getName());
      expected.add("@" + Annotation2.class.getName());
      expected.add("@" + Annotation3.class.getName());
      assertAnnotations(expected, constructor.getAnnotations());
      assertNull(constructor.getFactory());
      assertNull(constructor.getParameters());
      assertNull(constructor.getValue());
   }
View Full Code Here

      assertNull(constructor.getValue());
   }

   public void testConstructorWithFactory() throws Exception
   {
      ConstructorMetaData constructor = getConstructor();
      assertNull(constructor.getFactoryClass());
      assertEquals("Dummy", constructor.getFactoryMethod());
      assertNull(constructor.getAnnotations());
      assertNotNull(constructor.getFactory());
      assertNull(constructor.getParameters());
      assertNull(constructor.getValue());
   }
View Full Code Here

      assertNull(constructor.getValue());
   }

   public void testConstructorWithParameter() throws Exception
   {
      ConstructorMetaData constructor = getConstructor();
      assertNull(constructor.getFactoryClass());
      assertNull(constructor.getFactoryMethod());
      assertNull(constructor.getAnnotations());
      assertNull(constructor.getFactory());
      ArrayList<String> expected = new ArrayList<String>();
      expected.add("Parameter1");
      assertParameters(expected, constructor.getParameters());
      assertNull(constructor.getValue());
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.xb.builder.object.mc.support.model.ConstructorMetaData

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.