Package org.jboss.test.metatype.values.factory.support

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


      checkSingle(TestEnum.ONE, false);
   }

   public void testGenericUnwrap() throws Exception
   {
      checkSingle(new TestGeneric("123"), true);
      checkSingle(new TestGeneric("123"), false);
   }
View Full Code Here


      checkCollection(new ArrayList<TestEnum>(), getType("Enum", List.class), one, two, three, one);
      checkCollection(new HashSet<TestEnum>(), one, two, three, one);
      checkCollection(new HashSet<TestEnum>(), Set.class, one, two, three, one);
      checkCollection(new HashSet<TestEnum>(), getType("Enum", Set.class), one, two, three, one);

      TestGeneric g1 = new TestGeneric("123");
      TestGeneric g2 = new TestGeneric("123");
      checkCollection(new ArrayList<TestGeneric>(), g1, g2);
      checkCollection(new ArrayList<TestGeneric>(), List.class, g1, g2);
      checkCollection(new ArrayList<TestGeneric>(), getType("Generic", List.class), g1, g2);
      checkCollection(new HashSet<TestGeneric>(), g1, g2);
      checkCollection(new HashSet<TestGeneric>(), Set.class, g1, g2);
View Full Code Here

      for(int i = 0; i < 128; i++)
      {
         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;
View Full Code Here

    *
    * @throws Exception for any problem
    */
   public void testGeneric() throws Exception
   {
      TestGeneric test = new TestGeneric("Hello");
      GenericMetaType generic = new GenericMetaType(TestGeneric.class.getName(), TestGeneric.class.getName());
      GenericValue expected = new GenericValueSupport(generic, test);
     
      MetaValue result = createMetaValue(test);
      GenericValue actual = assertInstanceOf(result, GenericValue.class);
View Full Code Here

    *
    * @throws Exception for any problem
    */
   public void testGenericComposite() throws Exception
   {
      TestGeneric test = new TestGeneric("Hello");
      TestGenericComposite composite = new TestGenericComposite();
      composite.setGeneric(test);
      GenericMetaType generic = new GenericMetaType(TestGeneric.class.getName(), TestGeneric.class.getName());
      GenericValue genericValue = new GenericValueSupport(generic, test);
      MutableCompositeMetaType compositeType = new MutableCompositeMetaType(TestGenericComposite.class.getName(), TestGenericComposite.class.getName());
View Full Code Here

TOP

Related Classes of org.jboss.test.metatype.values.factory.support.TestGeneric

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.