Package net.infopeers.restrant.commons.populate

Examples of net.infopeers.restrant.commons.populate.Populator.clone()


    TestClass1 test1 = new TestClass1();
    test1.setIntValue(111);

    Populator populator = createPopulator();

    TestClass2 test2 = (TestClass2) populator
        .clone(TestClass2.class, test1);

    assertEquals(111, test2.getIntValue());
  }
View Full Code Here


    }
    test1.setTestObjectArray2linkedList(test1Array);

    Populator populator = createPopulator();

    TestClass2 test2 = (TestClass2) populator
        .clone(TestClass2.class, test1);

    LinkedList list = test2.getTestObjectArray2linkedList();
    assertEquals(3, list.size());
    Utils.validate(this, (TestClass2) list.get(0));
View Full Code Here

  public void testLight() throws Exception {
    TestClass1 test1 = Utils.createTestClass1();

    Populator populator = createPopulator();

    TestClass2 test2 = (TestClass2) populator
        .clone(TestClass2.class, test1);

    Utils.validate(this, test2);
  }
View Full Code Here

    TestClass1 test1 = Utils.createTestClass1();
    test1.setTestObject(Utils.createTestClass1());

    Populator populator = createPopulator();
    TestClass2 test2 = (TestClass2) populator
        .clone(TestClass2.class, test1);

    Utils.validate(this, test2);
    Utils.validate(this, test2.getTestObject());
  }
View Full Code Here

      from.add(test1);
    }

    Populator populator = createPopulator();

    LinkedList to = (LinkedList) populator.clone(LinkedList.class, from);

    for (int i = 0; i < 5; ++i) {
      TestClass2 test2 = (TestClass2) to.get(i);
      Utils.validate(this, test2);
      Utils.validate(this, test2.getTestObject());
View Full Code Here

      from.add(test1);
    }

    Populator populator = createPopulator();

    TestClass2[] to = (TestClass2[]) populator.clone(TestClass2[].class,
        from);

    for (int i = 0; i < 5; ++i) {
      TestClass2 test2 = (TestClass2) to[i];
      Utils.validate(this, test2);
View Full Code Here

      from[i] = test1;
    }

    Populator populator = createPopulator();

    LinkedList to = (LinkedList) populator.clone(LinkedList.class, from);

    for (int i = 0; i < 5; ++i) {
      TestClass2 test2 = (TestClass2) to.get(i);
      Utils.validate(this, test2);
      Utils.validate(this, test2.getTestObject());
View Full Code Here

      from[i] = test1;
    }

    Populator populator = createPopulator();

    TestClass2[] to = (TestClass2[]) populator.clone(TestClass2[].class,
        from);

    for (int i = 0; i < 5; ++i) {
      TestClass2 test2 = (TestClass2) to[i];
      Utils.validate(this, test2);
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.