Examples of SimpleBean


Examples of org.jboss.test.javabean.support.SimpleBean

   BigInteger bigIntegerValue = new BigInteger("123456");

   public void testConfigure() throws Exception
   {
      // check bean
      SimpleBean bean = unmarshal("TestConfigure.xml", SimpleBean.class);
      validateFields("()", null, bean);
   }
View Full Code Here

Examples of org.jboss.test.jmx.conf.SimpleBean

         Class[] clazzes = (Class[])server.getAttribute(target, "ClassArrayAttr");
         assertTrue("ClassArrayAttr array length == 2", clazzes.length == 2);
         assertTrue("ClassArrayAttr[0] of correct type", clazzes[0].getName().equals("org.jboss.test.jmx.conf.SimpleClass1"));
         assertTrue("ClassArrayAttr[1] of correct type", clazzes[1].getName().equals("org.jboss.test.jmx.conf.SimpleClass2"));
        
         SimpleBean bean = (SimpleBean)server.getAttribute(target, "BeanAttr");
         assertTrue("bean.getAString() == 'string'", bean.getAString().equals("string"));
         assertTrue("bean.getAStringArray().length == 2", bean.getAStringArray().length == 2);
         assertTrue("ean.getAStringArray()[0] == 'string1'", bean.getAStringArray()[0].equals("string1"));
         assertTrue("ean.getAStringArray()[0] == 'string1'", bean.getAStringArray()[1].equals("string2"));
      }
      catch (Exception e)
      {
         getLog().warn("Caught exception", e);
         fail("Unexcepted Exception, see the Log file");
View Full Code Here

Examples of org.jboss.test.joinpoint.reflect.support.SimpleBean

   {
      JoinpointFactory jpf = getJointpointFactory(SimpleBean.class);
      Object object = Config.instantiate(jpf, new String[0], new Object[0]);
      assertNotNull(object);
      assertTrue(object instanceof SimpleBean);
      SimpleBean bean = (SimpleBean) object;
      assertEquals("()", bean.getConstructorUsed());
   }
View Full Code Here

Examples of org.jboss.test.joinpoint.support.SimpleBean

   {
      JoinpointFactory jpf = getJointpointFactory(SimpleBean.class);
      Object object = Config.instantiate(jpf, new String[0], new Object[0]);
      assertNotNull(object);
      assertTrue(object instanceof SimpleBean);
      SimpleBean bean = (SimpleBean) object;
      assertEquals("()", bean.getConstructorUsed());
   }
View Full Code Here

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

      smd.put(key2, value2);

      AbstractPropertyMetaData pmd = new AbstractPropertyMetaData("map", smd);
      properties.add(pmd);
     
      SimpleBean bean = (SimpleBean) instantiateAndConfigure(bmd);
      assertNotNull(bean);
     
      Map result = bean.getMap();
      assertNotNull("Should be a map", result);
     
      Map expected = new HashMap();
      expected.put(object1, object2);
      expected.put(object2, object1);
View Full Code Here

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

      assertEquals(expected, result);
   }

   public void testSimpleMapFromStrings() throws Throwable
   {
      SimpleBean bean = simpleMapFromStrings();
      assertNotNull(bean);
     
      Map result = bean.getMap();
      assertNotNull("Should be a map", result);
     
      HashMap expected = new HashMap();
      expected.put(string1, string2);
      expected.put(string2, string1);
View Full Code Here

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

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

   public void testCustomMapExplicit() throws Throwable
   {
      SimpleBean bean = customMapExplicit();
      assertNotNull(bean);
     
      Map result = bean.getMap();
      assertNotNull("Should be a map", result);
      assertTrue("Not a CustomMap: " + result.getClass(), result instanceof CustomMap);
     
      HashMap expected = new HashMap();
      expected.put(string1, string2);
View Full Code Here

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

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

   public void testCustomMapFromSignature() throws Throwable
   {
      SimpleBean bean = customMapFromSignature();
      assertNotNull(bean);
     
      Map result = bean.getCustomMap();
      assertNotNull("Should be a map", result);
      assertTrue("Not a CustomMap: " + result.getClass(), result instanceof CustomMap);
     
      HashMap expected = new HashMap();
      expected.put(string1, string2);
View Full Code Here

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

   /*
    * FIXME TODO - allow retrieval of map instance from the bean
    */
   public void TODOtestCustomMapPreInstantiated() throws Throwable
   {
      SimpleBean bean = customMapPreInstantiated();
      assertNotNull(bean);
     
      Map result = bean.getPreInstantiatedMap();
      assertNotNull("Should be a map", result);
      assertTrue("Not a CustomMap: " + result.getClass(), result instanceof CustomMap);
      assertTrue("Not preinstantiated", ((CustomMap) result).getPreInstantiated());
     
      HashMap expected = new HashMap();
View Full Code Here

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

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

   public void testMapWithKeyTypeOverride() throws Throwable
   {
      SimpleBean bean = mapWithKeyTypeOverride();
      assertNotNull(bean);
     
      Map result = bean.getMap();
      assertNotNull("Should be a map", result);
      assertTrue("Not a CustomMap: " + result.getClass(), result instanceof CustomMap);
     
      HashMap expected = new HashMap();
      expected.put(string1, string2);
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.