@Test public void testNullUuid() { final String uuid = null; PersonPagePropertiesDTOToThemeCssUrlTransformer sut = new PersonPagePropertiesDTOToThemeCssUrlTransformer( "/prefix/", ".extension", "_sep_", themeVersionByUuidMapper); context.checking(new Expectations() { { oneOf(pppDto).getThemeUuid(); will(returnValue(uuid)); } }); assertEquals(null, sut.transform(pppDto)); context.assertIsSatisfied(); }
@Override public String transform(final PersonPagePropertiesDTO inTransformType) { String result = null; String themeUuid = inTransformType.getThemeUuid(); if (themeUuid != null) { String version = themeVersionByUuidMapper.execute(themeUuid); result = themePathPrefix + version + themeUuidSeparator + themeUuid + themeExtension; } return result; }
PersonPagePropertiesDTOToThemeCssUrlTransformer implements Transformer<PersonPagePropertiesDTO, String> { @Override public String transform(final PersonPagePropertiesDTO inTransformType) { String result = null; String themeUuid = inTransformType.getThemeUuid(); if (themeUuid != null) { String version = themeVersionByUuidMapper.execute(themeUuid); result = themePathPrefix + version + themeUuidSeparator + themeUuid + themeExtension; } return result; } }
PersonPagePropertiesDTOToThemeCssUrlTransformer implements Transformer<PersonPagePropertiesDTO, String> { @Override public String transform(final PersonPagePropertiesDTO inTransformType) { String result = null; String themeUuid = inTransformType.getThemeUuid(); if (themeUuid != null) { String version = themeVersionByUuidMapper.execute(themeUuid); result = themePathPrefix + version + themeUuidSeparator + themeUuid + themeExtension; } return result; } PersonPagePropertiesDTOToThemeCssUrlTransformer(final String inThemePathPrefix,
            final String inThemeExtension, final String inThemeUuidSeparator,
            final DomainMapper<String, String> inThemeVersionByUuidMapper); }
PersonPagePropertiesDTOToThemeCssUrlTransformer implements Transformer<PersonPagePropertiesDTO, String> { @Override public String transform(final PersonPagePropertiesDTO inTransformType) { String result = null; String themeUuid = inTransformType.getThemeUuid(); if (themeUuid != null) { String version = themeVersionByUuidMapper.execute(themeUuid); result = themePathPrefix + version + themeUuidSeparator + themeUuid + themeExtension; } return result; } PersonPagePropertiesDTOToThemeCssUrlTransformer(final String inThemePathPrefix,
            final String inThemeExtension, final String inThemeUuidSeparator,
            final DomainMapper<String, String> inThemeVersionByUuidMapper); @Override String transform(final PersonPagePropertiesDTO inTransformType); }
PersonPagePropertiesDTOToThemeCssUrlTransformer implements Transformer<PersonPagePropertiesDTO, String> { @Override public String transform(final PersonPagePropertiesDTO inTransformType) { String result = null; String themeUuid = inTransformType.getThemeUuid(); if (themeUuid != null) { String version = themeVersionByUuidMapper.execute(themeUuid); result = themePathPrefix + version + themeUuidSeparator + themeUuid + themeExtension; } return result; } PersonPagePropertiesDTOToThemeCssUrlTransformer(final String inThemePathPrefix,
            final String inThemeExtension, final String inThemeUuidSeparator,
            final DomainMapper<String, String> inThemeVersionByUuidMapper); @Override String transform(final PersonPagePropertiesDTO inTransformType);  }