summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/schema/OutsideTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/test/java/com/yahoo/schema/OutsideTestCase.java')
-rw-r--r--config-model/src/test/java/com/yahoo/schema/OutsideTestCase.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/OutsideTestCase.java b/config-model/src/test/java/com/yahoo/schema/OutsideTestCase.java
new file mode 100644
index 00000000000..0c0684e23e3
--- /dev/null
+++ b/config-model/src/test/java/com/yahoo/schema/OutsideTestCase.java
@@ -0,0 +1,32 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.schema;
+
+import com.yahoo.schema.parser.ParseException;
+import org.junit.Test;
+
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+/**
+ * Tests settings outside the document
+ *
+ * @author bratseth
+ */
+public class OutsideTestCase extends AbstractSchemaTestCase {
+
+ @Test
+ public void testOutsideIndex() throws IOException, ParseException {
+ Schema schema = ApplicationBuilder.buildFromFile("src/test/examples/outsidedoc.sd");
+
+ Index defaultIndex= schema.getIndex("default");
+ assertTrue(defaultIndex.isPrefix());
+ assertEquals("default.default",defaultIndex.aliasIterator().next());
+ }
+
+ @Test
+ public void testOutsideSummary() throws IOException, ParseException {
+ ApplicationBuilder.buildFromFile("src/test/examples/outsidesummary.sd");
+ }
+
+}