brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorbett <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Promote apps in catalog to Templa...
Date Thu, 09 Oct 2014 10:58:18 GMT
Github user sjcorbett commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/211#discussion_r18638368
  
    --- Diff: core/src/test/java/brooklyn/entity/rebind/transformer/impl/XsltTransformerTest.java
---
    @@ -25,35 +25,37 @@
     import brooklyn.entity.rebind.transformer.impl.XsltTransformer;
     import brooklyn.entity.rebind.transformer.impl.XsltTransformerTest;
     import brooklyn.util.ResourceUtils;
    +import brooklyn.util.os.Os;
     import brooklyn.util.text.TemplateProcessor;
     
     import com.google.common.collect.ImmutableMap;
     
     public class XsltTransformerTest {
    +    private static final String NL = Os.LINE_SEPARATOR;
     
         @Test
         public void testRenameType() throws Exception {
             String xsltTemplate = ResourceUtils.create(XsltTransformerTest.class).getResourceAsString("classpath://brooklyn/entity/rebind/transformer/renameType.xslt");
             String xslt = TemplateProcessor.processTemplateContents(xsltTemplate, ImmutableMap.of("old_val",
"mytype.Before", "new_val", "mytype.After"));
             String input = 
    -                "<entity myattrib=\"myval\">"+"\n"+
    -                "  <type myattrib2=\"myval2\">mytype.Before</type>"+"\n"+
    -                "  <nested>"+"\n"+
    -                "    <type myattrib3=\"myval3\">doesNotMatch</type>"+"\n"+
    -                "    <type myattrib4=\"myval4\">partial.mytype.Before</type>"+"\n"+
    -                "    <type myattrib5=\"myval5\">mytype.Before</type>"+"\n"+
    -                "  </nested>"+"\n"+
    -                "  <id>myid</id>"+"\n"+
    +                "<entity myattrib=\"myval\">"+NL+
    --- End diff --
    
    Why do these strings need newline separators? Does the test change if the XML is collapsed?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message