@Test public void test() { context.checking(new Expectations() { { oneOf(theme).getId(); will(returnValue(themeId)); oneOf(theme).getName(); will(returnValue(themeName)); } }); ThemeDTO result = sut.transform(new ArrayList<Theme>(Arrays.asList(theme))).get(0); assertEquals(themeId, result.getId()); assertEquals(themeName, result.getName()); context.assertIsSatisfied(); }
@Override public List<ThemeDTO> transform(final List<Theme> inTransformType) { List<ThemeDTO> results = new ArrayList<ThemeDTO>(); for (Theme theme : inTransformType) { ThemeDTO dto = new ThemeDTO(); dto.setId(theme.getId()); dto.setName(theme.getName()); results.add(dto); } return results; }
ThemeToThemeDTOTransformer implements Transformer<List<Theme>, List<ThemeDTO>> { @Override public List<ThemeDTO> transform(final List<Theme> inTransformType) { List<ThemeDTO> results = new ArrayList<ThemeDTO>(); for (Theme theme : inTransformType) { ThemeDTO dto = new ThemeDTO(); dto.setId(theme.getId()); dto.setName(theme.getName()); results.add(dto); } return results; } }
ThemeToThemeDTOTransformer implements Transformer<List<Theme>, List<ThemeDTO>> { @Override public List<ThemeDTO> transform(final List<Theme> inTransformType) { List<ThemeDTO> results = new ArrayList<ThemeDTO>(); for (Theme theme : inTransformType) { ThemeDTO dto = new ThemeDTO(); dto.setId(theme.getId()); dto.setName(theme.getName()); results.add(dto); } return results; }  }
ThemeToThemeDTOTransformer implements Transformer<List<Theme>, List<ThemeDTO>> { @Override public List<ThemeDTO> transform(final List<Theme> inTransformType) { List<ThemeDTO> results = new ArrayList<ThemeDTO>(); for (Theme theme : inTransformType) { ThemeDTO dto = new ThemeDTO(); dto.setId(theme.getId()); dto.setName(theme.getName()); results.add(dto); } return results; }  @Override List<ThemeDTO> transform(final List<Theme> inTransformType); }
ThemeToThemeDTOTransformer implements Transformer<List<Theme>, List<ThemeDTO>> { @Override public List<ThemeDTO> transform(final List<Theme> inTransformType) { List<ThemeDTO> results = new ArrayList<ThemeDTO>(); for (Theme theme : inTransformType) { ThemeDTO dto = new ThemeDTO(); dto.setId(theme.getId()); dto.setName(theme.getName()); results.add(dto); } return results; }  @Override List<ThemeDTO> transform(final List<Theme> inTransformType);  }