コード例 #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 testMapEntityToObject() throws Exception {
    PromotionAfterBean beanAfter = new PromotionAfterBean();
    promotionMapping.mapEntity(promotionAfter, beanAfter);
    assertEquals("PromoA", beanAfter.getName());

    PromotionBeforeBean beanBefore = new PromotionBeforeBean();
    promotionMapping.mapEntity(promotionBefore, beanBefore);
    assertEquals("PromoB", beanBefore.getName());
  }
コード例 #3
0
 @Test
 public void testMapDtoToType() throws Exception {
   assertEquals("PromoA", promotionMapping.mapDto(promotionAfterBean).getName());
   assertEquals("PromoB", promotionMapping.mapDto(promotionBeforeBean).getName());
 }
コード例 #4
0
 @Test
 public void testMapEntityToType() throws Exception {
   assertEquals("PromoA", promotionMapping.mapEntity(promotionAfter).getName());
   assertEquals("PromoB", promotionMapping.mapEntity(promotionBefore).getName());
 }