Examples of MyBeanPrimeInteger


Examples of org.dozer.vo.enumtest.MyBeanPrimeInteger

   */
  @SuppressWarnings("unused")
  @Test(expected = MappingException.class)
  public void testIntegerMapsToEnumOutOfOrdinalRange() {
    mapper = getMapper(new String[] { "enumMapping.xml" });
    MyBeanPrimeInteger src = new MyBeanPrimeInteger();
    src.setFirst(0);
    src.setSecond(3);
    MyBean dest = mapper.map(src, MyBean.class);
  }
View Full Code Here

Examples of org.dozer.vo.enumtest.MyBeanPrimeInteger

   * Test on a mapping from integer types to enum.
   */
  @Test
  public void testIntegerMapsToEnum() {
    mapper = getMapper(new String[] { "enumMapping.xml" });
    MyBeanPrimeInteger src = new MyBeanPrimeInteger();
    src.setFirst(0);
    src.setSecond(1);
    MyBean dest = mapper.map(src, MyBean.class);
    assertEquals(SrcType.FOO, dest.getSrcType());
    assertEquals(SrcTypeWithOverride.BAR, dest.getSrcTypeWithOverride());
  }
View Full Code Here

Examples of org.dozer.vo.enumtest.MyBeanPrimeInteger

  public void testEnumMapsToInteger() {
    mapper = getMapper(new String[] { "enumMapping.xml" });
    MyBean src = new MyBean();
    src.setSrcType(SrcType.FOO);
    src.setSrcTypeWithOverride(SrcTypeWithOverride.BAR);
    MyBeanPrimeInteger dest = mapper.map(src, MyBeanPrimeInteger.class);
    assertEquals(0, dest.getFirst());
    assertEquals(Integer.valueOf(1), dest.getSecond());
  }
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.