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

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


      assertInstalls(expected, bean.getUninstalls());
   }

   public void testBeanWithInstallCallback() throws Exception
   {
      AbstractBeanMetaData bean = unmarshalBean();
      assertNull(bean.getName());
      assertEquals("Dummy", bean.getBean());
      assertNull(bean.getMode());
      assertNull(bean.getAnnotations());
      assertNull(bean.getClassLoader());
      assertNull(bean.getConstructor());
      assertNull(bean.getProperties());
      assertNull(bean.getCreate());
      assertNull(bean.getStart());
      assertNull(bean.getStop());
      assertNull(bean.getDestroy());
      assertNull(bean.getDemands());
      assertNull(bean.getSupplies());
      assertNull(bean.getInstalls());
      assertNull(bean.getUninstalls());
      ArrayList<String> expected = new ArrayList<String>();
      expected.add("Install1");
      assertCallbacks(expected, bean.getInstallCallbacks());
      assertNull(bean.getUninstallCallbacks());
   }
View Full Code Here


      assertNull(bean.getUninstallCallbacks());
   }

   public void testBeanWithInstallCallbacks() throws Exception
   {
      AbstractBeanMetaData bean = unmarshalBean();
      assertNull(bean.getName());
      assertEquals("Dummy", bean.getBean());
      assertNull(bean.getMode());
      assertNull(bean.getAnnotations());
      assertNull(bean.getClassLoader());
      assertNull(bean.getConstructor());
      assertNull(bean.getProperties());
      assertNull(bean.getCreate());
      assertNull(bean.getStart());
      assertNull(bean.getStop());
      assertNull(bean.getDestroy());
      assertNull(bean.getDemands());
      assertNull(bean.getSupplies());
      assertNull(bean.getInstalls());
      assertNull(bean.getUninstalls());
      ArrayList<String> expected = new ArrayList<String>();
      expected.add("Install1");
      expected.add("Install2");
      expected.add("Install3");
      assertCallbacks(expected, bean.getInstallCallbacks());
      assertNull(bean.getUninstallCallbacks());
   }
View Full Code Here

      assertNull(bean.getUninstallCallbacks());
   }

   public void testBeanWithUninstallCallback() throws Exception
   {
      AbstractBeanMetaData bean = unmarshalBean();
      assertNull(bean.getName());
      assertEquals("Dummy", bean.getBean());
      assertNull(bean.getMode());
      assertNull(bean.getAnnotations());
      assertNull(bean.getClassLoader());
      assertNull(bean.getConstructor());
      assertNull(bean.getProperties());
      assertNull(bean.getCreate());
      assertNull(bean.getStart());
      assertNull(bean.getStop());
      assertNull(bean.getDestroy());
      assertNull(bean.getDemands());
      assertNull(bean.getSupplies());
      assertNull(bean.getInstalls());
      assertNull(bean.getUninstalls());
      assertNull(bean.getInstallCallbacks());
      ArrayList<String> expected = new ArrayList<String>();
      expected.add("Uninstall1");
      assertCallbacks(expected, bean.getUninstallCallbacks());
   }
View Full Code Here

      assertCallbacks(expected, bean.getUninstallCallbacks());
   }

   public void testBeanWithUninstallCallbacks() throws Exception
   {
      AbstractBeanMetaData bean = unmarshalBean();
      assertNull(bean.getName());
      assertEquals("Dummy", bean.getBean());
      assertNull(bean.getMode());
      assertNull(bean.getAnnotations());
      assertNull(bean.getClassLoader());
      assertNull(bean.getConstructor());
      assertNull(bean.getProperties());
      assertNull(bean.getCreate());
      assertNull(bean.getStart());
      assertNull(bean.getStop());
      assertNull(bean.getDestroy());
      assertNull(bean.getDemands());
      assertNull(bean.getSupplies());
      assertNull(bean.getInstalls());
      assertNull(bean.getUninstalls());
      assertNull(bean.getInstallCallbacks());
      ArrayList<String> expected = new ArrayList<String>();
      expected.add("Uninstall1");
      expected.add("Uninstall2");
      expected.add("Uninstall3");
      assertCallbacks(expected, bean.getUninstallCallbacks());
   }
View Full Code Here

*/
public class ListTestCase extends AbstractMCTest
{
   protected AbstractListMetaData getCollection() throws Exception
   {
      AbstractBeanMetaData bean = unmarshalBean();
      Set<?> properties = bean.getProperties();
      assertNotNull(properties);
      assertEquals(1, properties.size());
      PropertyMetaData property = (PropertyMetaData) properties.iterator().next();
      assertNotNull(property);
      ValueMetaData value = property.getValue();
View Full Code Here

*/
public class SetTestCase extends AbstractMCTest
{
   protected AbstractSetMetaData getCollection() throws Exception
   {
      AbstractBeanMetaData bean = unmarshalBean();
      Set<?> properties = bean.getProperties();
      assertNotNull(properties);
      assertEquals(1, properties.size());
      PropertyMetaData property = (PropertyMetaData) properties.iterator().next();
      assertNotNull(property);
      ValueMetaData value = property.getValue();
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

      this.uninstalls = uninstalls;
   }

   public List<BeanMetaData> getBeans()
   {
      AbstractBeanMetaData gbf = new AbstractBeanMetaData();
      gbf.setName(name);
      gbf.setAliases(aliases);
      gbf.setBean("GenericBeanFactory");
      gbf.setMode(mode);
      Set<PropertyMetaData> properties = new HashSet<PropertyMetaData>();
      gbf.setProperties(properties);
      properties.add(createProperty("bean", bean));
      properties.add(createProperty("classLoader", classLoader));
      properties.add(createProperty("constructor", constructor));
      properties.add(createMapProperty("properties", properties));
      properties.add(createProperty("start", start));
View Full Code Here

*/
public class ParameterTestCase extends AbstractMCTest
{
   protected ParameterMetaData getParameter() throws Exception
   {
      AbstractBeanMetaData bean = unmarshalBean();
      ConstructorMetaData constructor = bean.getConstructor();
      assertNotNull(constructor);
      List<?> parameters = constructor.getParameters();
      assertNotNull(parameters);
      assertEquals(1, parameters.size());
      ParameterMetaData parameter = (ParameterMetaData) parameters.get(0);
View Full Code Here

*/
public class ValueTestCase extends AbstractMCTest
{
   protected StringValueMetaData getValue() throws Exception
   {
      AbstractBeanMetaData bean = unmarshalBean();
      Set<?> properties = bean.getProperties();
      assertNotNull(properties);
      assertEquals(1, properties.size());
      PropertyMetaData property = (PropertyMetaData) properties.iterator().next();
      assertNotNull(property);
      ValueMetaData value = property.getValue();
View Full Code Here

TOP

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

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.