Examples of MyBeanPrimeLong


Examples of org.dozer.vo.enumtest.MyBeanPrimeLong

   * Test on a mapping from long types to enum.
   */
  @Test
  public void testLongMapsToEnum() {
    mapper = getMapper(new String[] { "enumMapping.xml" });
    MyBeanPrimeLong src = new MyBeanPrimeLong();
    src.setFirst(0L);
    src.setSecond(1L);
    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.MyBeanPrimeLong

  public void testEnumMapsToLong() {
    mapper = getMapper(new String[] { "enumMapping.xml" });
    MyBean src = new MyBean();
    src.setSrcType(SrcType.FOO);
    src.setSrcTypeWithOverride(SrcTypeWithOverride.BAR);
    MyBeanPrimeLong dest = mapper.map(src, MyBeanPrimeLong.class);
    assertEquals(0, dest.getFirst());
    assertEquals(Long.valueOf(1L), dest.getSecond());
  }
View Full Code Here

Examples of org.dozer.vo.enumtest.MyBeanPrimeLong

   */
  @SuppressWarnings("unused")
  @Test(expected = MappingException.class)
  public void testLongMapsToEnumOutOfOrdinalRange() {
    mapper = getMapper(new String[] { "enumMapping.xml" });
    MyBeanPrimeLong src = new MyBeanPrimeLong();
    src.setFirst(0L);
    src.setSecond(3L);
    MyBean dest = mapper.map(src, MyBean.class);
  }
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.