@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()); }
@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()); }
@Test public void testMapDtoToType() throws Exception { assertEquals("PromoA", promotionMapping.mapDto(promotionAfterBean).getName()); assertEquals("PromoB", promotionMapping.mapDto(promotionBeforeBean).getName()); }
@Test public void testMapEntityToType() throws Exception { assertEquals("PromoA", promotionMapping.mapEntity(promotionAfter).getName()); assertEquals("PromoB", promotionMapping.mapEntity(promotionBefore).getName()); }