From 22b480874b1ca6400b8cd2640f678c210da07fa3 Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Tue, 25 Sep 2018 15:33:42 -0700 Subject: Allow multiple regions and environments in a single attribute --- .../config/application/IncludeProcessorTest.java | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'config-application-package/src/test/java/com/yahoo/config/application/IncludeProcessorTest.java') diff --git a/config-application-package/src/test/java/com/yahoo/config/application/IncludeProcessorTest.java b/config-application-package/src/test/java/com/yahoo/config/application/IncludeProcessorTest.java index d3c2b672ee5..a456924673d 100644 --- a/config-application-package/src/test/java/com/yahoo/config/application/IncludeProcessorTest.java +++ b/config-application-package/src/test/java/com/yahoo/config/application/IncludeProcessorTest.java @@ -13,44 +13,48 @@ import java.io.*; import java.nio.file.NoSuchFileException; /** - * @author lulf - * @since 5.22 + * @author Ulf Lilleengen */ public class IncludeProcessorTest { @Test - public void testInclude() throws IOException, SAXException, XMLStreamException, ParserConfigurationException, TransformerException { + public void testInclude() throws IOException, SAXException, ParserConfigurationException, TransformerException { File app = new File("src/test/resources/multienvapp"); DocumentBuilder docBuilder = Xml.getPreprocessDocumentBuilder(); - String expected = "\n" + + String expected = + "" + + "\n" + " \n" + " 4099\n" + " 5000\n" + " \n" + " \n" + " 5001" + - " 5002" + + " 5002" + " \n" + " \n" + " \n" + " \n" + - " \n" + + " \n" + " \n" + " \n" + " \n" + " 1\n" + " \n" + - "\n" + + " \n" + " \n" + - "\n" + + " " + + " \n" + " \n" + " \n" + - "\n" + + " " + + " \n" + " \n" + " \n" + " \n" + - "\n" + + " " + + "\n" + "\n" + " \n" + " \n" + @@ -68,7 +72,7 @@ public class IncludeProcessorTest { " \n" + ""; - Document doc = (new IncludeProcessor(app)).process(docBuilder.parse(Xml.getServices(app))); + Document doc = new IncludeProcessor(app).process(docBuilder.parse(Xml.getServices(app))); // System.out.println(Xml.documentAsString(doc)); TestBase.assertDocument(expected, doc); } @@ -77,7 +81,7 @@ public class IncludeProcessorTest { public void testRequiredIncludeIsDefault() throws ParserConfigurationException, IOException, SAXException, TransformerException { File app = new File("src/test/resources/multienvapp_failrequired"); DocumentBuilder docBuilder = Xml.getPreprocessDocumentBuilder(); - (new IncludeProcessor(app)).process(docBuilder.parse(Xml.getServices(app))); + new IncludeProcessor(app).process(docBuilder.parse(Xml.getServices(app))); } } -- cgit v1.2.3