@Test public final void populate() { LinkInformation info = new LinkInformation(); info.setDescription("description"); info.setUrl("url"); info.setTitle("title"); info.setSelectedThumbnail("thumbnail"); BookmarkPopulator sut = new BookmarkPopulator(); sut.setLinkInformation(info); ActivityDTO activity = new ActivityDTO(); activity.setBaseObjectProperties(new HashMap<String, String>()); sut.populate(activity); Assert.assertEquals(BaseObjectType.BOOKMARK, activity.getBaseObjectType()); Assert.assertEquals("description", activity.getBaseObjectProperties().get("description")); Assert.assertEquals("url", activity.getBaseObjectProperties().get("targetUrl")); Assert.assertEquals("title", activity.getBaseObjectProperties().get("targetTitle")); Assert.assertEquals("thumbnail", activity.getBaseObjectProperties().get("thumbnail")); }
public void populate(final ActivityDTO activity) { activity.setBaseObjectType(BaseObjectType.BOOKMARK); activity.getBaseObjectProperties().put("description", linkInformation.getDescription()); activity.getBaseObjectProperties().put("targetUrl", linkInformation.getUrl()); activity.getBaseObjectProperties().put("targetTitle", linkInformation.getTitle()); activity.getBaseObjectProperties().put("thumbnail", linkInformation.getSelectedThumbnail()); }
BookmarkPopulator implements ActivityDTOPopulatorStrategy { public void populate(final ActivityDTO activity) { activity.setBaseObjectType(BaseObjectType.BOOKMARK); activity.getBaseObjectProperties().put("description", linkInformation.getDescription()); activity.getBaseObjectProperties().put("targetUrl", linkInformation.getUrl()); activity.getBaseObjectProperties().put("targetTitle", linkInformation.getTitle()); activity.getBaseObjectProperties().put("thumbnail", linkInformation.getSelectedThumbnail()); } }
BookmarkPopulator implements ActivityDTOPopulatorStrategy { public void populate(final ActivityDTO activity) { activity.setBaseObjectType(BaseObjectType.BOOKMARK); activity.getBaseObjectProperties().put("description", linkInformation.getDescription()); activity.getBaseObjectProperties().put("targetUrl", linkInformation.getUrl()); activity.getBaseObjectProperties().put("targetTitle", linkInformation.getTitle()); activity.getBaseObjectProperties().put("thumbnail", linkInformation.getSelectedThumbnail()); }  }
BookmarkPopulator implements ActivityDTOPopulatorStrategy { public void populate(final ActivityDTO activity) { activity.setBaseObjectType(BaseObjectType.BOOKMARK); activity.getBaseObjectProperties().put("description", linkInformation.getDescription()); activity.getBaseObjectProperties().put("targetUrl", linkInformation.getUrl()); activity.getBaseObjectProperties().put("targetTitle", linkInformation.getTitle()); activity.getBaseObjectProperties().put("thumbnail", linkInformation.getSelectedThumbnail()); }  void setLinkInformation(final LinkInformation inLinkInformation); void populate(final ActivityDTO activity); }
BookmarkPopulator implements ActivityDTOPopulatorStrategy { public void populate(final ActivityDTO activity) { activity.setBaseObjectType(BaseObjectType.BOOKMARK); activity.getBaseObjectProperties().put("description", linkInformation.getDescription()); activity.getBaseObjectProperties().put("targetUrl", linkInformation.getUrl()); activity.getBaseObjectProperties().put("targetTitle", linkInformation.getTitle()); activity.getBaseObjectProperties().put("thumbnail", linkInformation.getSelectedThumbnail()); }  void setLinkInformation(final LinkInformation inLinkInformation); void populate(final ActivityDTO activity);  }