brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Feature: transform state
Date Wed, 24 Sep 2014 10:44:16 GMT
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/177#discussion_r17964491
  
    --- Diff: core/src/test/java/brooklyn/entity/rebind/transformer/impl/XsltTransformerTest.java
---
    @@ -0,0 +1,117 @@
    +package brooklyn.entity.rebind.transformer.impl;
    +
    +import static org.testng.Assert.assertEquals;
    +
    +import org.testng.annotations.Test;
    +
    +import brooklyn.entity.rebind.transformer.impl.XsltTransformer;
    +import brooklyn.entity.rebind.transformer.impl.XsltTransformerTest;
    +import brooklyn.util.ResourceUtils;
    +import brooklyn.util.text.TemplateProcessor;
    +
    +import com.google.common.collect.ImmutableMap;
    +
    +public class XsltTransformerTest {
    +
    +    @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"+
    --- End diff --
    
    Single quotes can be used to avoid escapes, but fine as is.


---
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