Examples of TestSimpleComposite


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

    * @return the test value
    */
   public Collection<TestSimpleComposite> compositeCollection()
   {
      Collection<TestSimpleComposite> result = new ArrayList<TestSimpleComposite>();
      result.add(new TestSimpleComposite("Hello"));
      result.add(new TestSimpleComposite("Goodbye"));
      return result;
   }
View Full Code Here

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

    * @return the test value
    */
   public List<TestSimpleComposite> compositeList()
   {
      List<TestSimpleComposite> result = new ArrayList<TestSimpleComposite>();
      result.add(new TestSimpleComposite("Hello"));
      result.add(new TestSimpleComposite("Goodbye"));
      return result;
   }
View Full Code Here

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

    * @return the test value
    */
   public Set<TestSimpleComposite> compositeSet()
   {
      Set<TestSimpleComposite> result = new LinkedHashSet<TestSimpleComposite>();
      result.add(new TestSimpleComposite("Hello"));
      result.add(new TestSimpleComposite("Goodbye"));
      return result;
   }
View Full Code Here

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

      checkSingle(new TestGeneric("123"), false);
   }

   public void testCompositeUnwrap() throws Exception
   {
      TestSimpleComposite composite = new TestSimpleComposite("something");
      checkSingle(composite, true);
      checkSingle(composite, false);

      checkSingle(new TestRecursiveSimpleComposite("something", composite), true);
      checkSingle(new TestRecursiveSimpleComposite("something", composite), false);
View Full Code Here

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

      checkCollection(new ArrayList<TestGeneric>(), getType("Generic", List.class), g1, g2);
      checkCollection(new HashSet<TestGeneric>(), g1, g2);
      checkCollection(new HashSet<TestGeneric>(), Set.class, g1, g2);
      checkCollection(new HashSet<TestGeneric>(), getType("Generic", Set.class), g1, g2);

      TestSimpleComposite c1 = new TestSimpleComposite("123");
      TestSimpleComposite c2 = new TestSimpleComposite("123");
      checkCollection(new ArrayList<TestSimpleComposite>(), c1, c2);
      checkCollection(new ArrayList<TestSimpleComposite>(), List.class, c1, c2);
      checkCollection(new ArrayList<TestSimpleComposite>(), getType("Composite", List.class), c1, c2);
      checkCollection(new HashSet<TestSimpleComposite>(), c1, c2);
      checkCollection(new HashSet<TestSimpleComposite>(), Set.class, c1, c2);
View Full Code Here

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

      {
         shorts[i] = (short)i;
         doubles[i] = i / Math.PI;
         enums[i] = TestEnum.values()[i % 3];
         generics[i] = new TestGeneric("#" + i);
         composits[i] = new TestSimpleComposite("#" + i);
         recursiveComposites[i] = new TestRecursiveSimpleComposite("#" + i, composits[i]);
         for(int j = 0; j < 128; j++)
         {
            integers[i][j] = 128 * i + j;
            for(int k = 0; k < 128; k++)
View Full Code Here

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

    * @throws Exception for any problem
    */
   @SuppressWarnings("unchecked")
   public void testCompositeArray() throws Exception
   {
      TestSimpleComposite hello = new TestSimpleComposite("Hello");
      TestSimpleComposite goodbye = new TestSimpleComposite("Goodbye");
      TestSimpleComposite[] array = { hello, goodbye };
      ArrayMetaType arrayType = assertInstanceOf(resolve(array.getClass()), ArrayMetaType.class);
      CompositeMetaType compositeType = assertInstanceOf(resolve(TestSimpleComposite.class), CompositeMetaType.class);
      String[] itemNames = { "something" };
      MetaValue[] itemValues = { SimpleValueSupport.wrap("Hello") };
View Full Code Here

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

    * @return the value
    */
   public Map<TestSimpleComposite, Integer> compositeKeyMap()
   {
      Map<TestSimpleComposite, Integer> result = new LinkedHashMap<TestSimpleComposite, Integer>();
      result.put(new TestSimpleComposite("Hello"), new Integer(1));
      result.put(new TestSimpleComposite("Goodbye"), new Integer(2));
      return result;
   }
View Full Code Here

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

    * @return the value
    */
   public Map<StringKey, TestSimpleComposite> compositeValueMap()
   {
      Map<StringKey, TestSimpleComposite> result = new LinkedHashMap<StringKey, TestSimpleComposite>();
      result.put(new StringKey("Hello"), new TestSimpleComposite("Hello"));
      result.put(new StringKey("Goodbye"), new TestSimpleComposite("Goodbye"));
      return result;
   }
View Full Code Here

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

      compositeType.freeze();

      String[] compositeNames = { "something" };
      CompositeValue expected = new CompositeValueSupport(compositeType, compositeNames, new MetaValue[] { SimpleValueSupport.wrap("Hello") });
     
      MetaValue result = createMetaValue(new TestSimpleComposite("Hello"));
      CompositeValue actual = assertInstanceOf(result, CompositeValue.class);
      getLog().debug("Composite Value: " + actual);
      assertEquals(expected, actual);
   }
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.