Package org.jboss.test.kernel.config.support

Examples of org.jboss.test.kernel.config.support.SimpleBean


      assertEquals(expected, result);
   }

   public void testSimpleCollectionFromStrings() throws Throwable
   {
      SimpleBean bean = simpleCollectionFromStrings();
      assertNotNull(bean);
     
      Collection result = bean.getCollection();
      assertNotNull("Should be a collection", result);
     
      ArrayList expected = new ArrayList();
      expected.add(string1);
      expected.add(string2);
View Full Code Here


      return (SimpleBean) instantiateAndConfigure(configurator, bmd);
   }

   public void testCustomCollectionExplicit() throws Throwable
   {
      SimpleBean bean = customCollectionExplicit();
      assertNotNull(bean);
     
      Collection result = bean.getCollection();
      assertNotNull("Should be a collection", result);
      assertTrue("Not a CustomCollection: " + result.getClass(), result instanceof CustomCollection);
     
      ArrayList expected = new ArrayList();
      expected.add(string1);
View Full Code Here

      return (SimpleBean) instantiateAndConfigure(configurator, bmd);
   }

   public void testCustomCollectionFromSignature() throws Throwable
   {
      SimpleBean bean = customCollectionFromSignature();
      assertNotNull(bean);
     
      Collection result = bean.getCustomCollection();
      assertNotNull("Should be a collection", result);
      assertTrue("Not a CustomCollection: " + result.getClass(), result instanceof CustomCollection);
     
      ArrayList expected = new ArrayList();
      expected.add(string1);
View Full Code Here

   /*
    * FIXME TODO - allow retrieval of collection instance from the bean
    */
   public void TODOtestCustomCollectionPreInstantiated() throws Throwable
   {
      SimpleBean bean = customCollectionPreInstantiated();
      assertNotNull(bean);
     
      Collection result = bean.getPreInstantiatedCollection();
      assertNotNull("Should be a collection", result);
      assertTrue("Not a CustomCollection: " + result.getClass(), result instanceof CustomCollection);
      assertTrue("Not preinstantiated", ((CustomCollection) result).getPreInstantiated());
     
      ArrayList expected = new ArrayList();
View Full Code Here

      return (SimpleBean) instantiateAndConfigure(configurator, bmd);
   }

   public void testCollectionWithValueTypeOverride() throws Throwable
   {
      SimpleBean bean = collectionWithValueTypeOverride();
      assertNotNull(bean);
     
      Collection result = bean.getCollection();
      assertNotNull("Should be a collection", result);
      assertTrue("Not a CustomCollection: " + result.getClass(), result instanceof CustomCollection);
     
      ArrayList expected = new ArrayList();
      expected.add(string1);
View Full Code Here

      return (SimpleBean) instantiateAndConfigure(configurator, bmd);
   }

   public void testCollectionInjectOnObject() throws Throwable
   {
      SimpleBean bean = collectionInjectOnObject();
      assertNotNull(bean);
     
      Object result = bean.getAnObject();
      assertNotNull("Should be a collection", result);
      assertTrue("Not a CustomCollection: " + result.getClass(), result instanceof ArrayList);
     
      ArrayList expected = new ArrayList();
      expected.add(string1);
View Full Code Here

   }

   public void testStringAttribute() throws Throwable
   {
      Object value = new String("StringValue");
      SimpleBean bean = configureSimpleBean("aString", value);
      assertEquals(value, bean.getAString());
   }
View Full Code Here

   }

   public void testByteAttribute() throws Throwable
   {
      Object value = new Byte("12");
      SimpleBean bean = configureSimpleBean("aByte", value);
      assertEquals(value, bean.getAByte());
   }
View Full Code Here

   }

   public void testBooleanAttribute() throws Throwable
   {
      Object value = Boolean.TRUE;
      SimpleBean bean = configureSimpleBean("aBoolean", value);
      assertEquals(value, bean.getABoolean());
   }
View Full Code Here

   } */

   public void testShortAttribute() throws Throwable
   {
      Object value = new Short("123");
      SimpleBean bean = configureSimpleBean("aShort", value);
      assertEquals(value, bean.getAShort());
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.kernel.config.support.SimpleBean

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.