Package net.infopeers.restrant.commons.populate

Examples of net.infopeers.restrant.commons.populate.Populator


  public void testOne() throws Exception {
    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


    for (int i = 0; i < 3; ++i) {
      test1Array[i] = Utils.createTestClass1();
    }
    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

    Calendar cal = Utils.createCalendar();

    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

      TestClass1 test1 = Utils.createTestClass1();
      test1.setTestObject(Utils.createTestClass1());
      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

      TestClass1 test1 = Utils.createTestClass1();
      test1.setTestObject(Utils.createTestClass1());
      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

      TestClass1 test1 = Utils.createTestClass1();
      test1.setTestObject(Utils.createTestClass1());
      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

      TestClass1 test1 = Utils.createTestClass1();
      test1.setTestObject(Utils.createTestClass1());
      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

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

    TestClass2 test2 = new TestClass2();

    Populator populator = createPopulator();

    populator.populate(test1, test2);

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

    test1.setTestObjectArray2linkedList(test1Array);
   
    TestClass2 test2 = new TestClass2();
   

    Populator populator = createPopulator();
    populator.populate(test1, test2);

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

TOP

Related Classes of net.infopeers.restrant.commons.populate.Populator

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.