Package jodd.petite.data

Examples of jodd.petite.data.PojoBean2


    pc.registerPetiteBean(PojoBean2.class, null, null, null, false);

    pc.setBeanProperty("pojoBean2.val1", "value");
    pc.setBeanProperty("pojoBean2.val2", "173");

    PojoBean2 pojo2 = (PojoBean2) pc.getBean("pojoBean2");
    assertEquals("value", pojo2.getVal1());
    assertEquals(173, pojo2.getVal2().intValue());
  }
View Full Code Here


    } catch (PetiteException ignore) {
    }
    pc.setBeanProperty("pojo.val1", "value");
    pc.setBeanProperty("pojo.bean.name", "foo");

    PojoBean2 pojo2 = (PojoBean2) pc.getBean("pojo");
    assertEquals("value", pojo2.getVal1());
    assertEquals("foo", pojo2.getBean().getName());

    pc.registerPetiteBean(PojoBean2.class, "pojo.bean", null, null, false);
    pc.setBeanProperty("pojo.bean.val1", "value");
    pc.setBeanProperty("pojo.bean.val2", "173");

    pojo2 = (PojoBean2) pc.getBean("pojo.bean");
    assertEquals("value", pojo2.getVal1());
    assertEquals(173, pojo2.getVal2().intValue());
  }
View Full Code Here

  @Test
  public void testGet() {
    PetiteContainer pc = new PetiteContainer();
    pc.registerPetiteBean(PojoBean2.class, null, null, null, false);

    PojoBean2 pojo2 = (PojoBean2) pc.getBean("pojoBean2");
    pojo2.setVal1("value");
    pojo2.setVal2(Integer.valueOf(173));

    pc.setBeanProperty("pojoBean2.val1", "value");
    pc.setBeanProperty("pojoBean2.val2", "173");

View Full Code Here

    PetiteContainer pc = new PetiteContainer();
    pc.registerPetiteBean(PojoBean2.class, null, null, null, false);
    pc.defineParameters(props);

    PojoBean2 pojoBean2 = pc.getBean(PojoBean2.class);

    assertEquals(123, pojoBean2.getVal2().intValue());
    assertEquals("${pojo}", pojoBean2.getVal1());
  }
View Full Code Here

TOP

Related Classes of jodd.petite.data.PojoBean2

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.