예제 #1
0
  @Test
  public void testMapDtoToObject() throws Exception {
    PromotionAfterEntity after = new PromotionAfterEntity();
    promotionMapping.mapDto(promotionAfterBean, after);
    assertEquals("PromoA", after.getName());

    PromotionBeforeEntity before = new PromotionBeforeEntity();
    promotionMapping.mapDto(promotionBeforeBean, before);
    assertEquals("PromoB", before.getName());
  }
예제 #2
0
 @Test
 public void testMapDtoToType() throws Exception {
   assertEquals("PromoA", promotionMapping.mapDto(promotionAfterBean).getName());
   assertEquals("PromoB", promotionMapping.mapDto(promotionBeforeBean).getName());
 }