diff options
Diffstat (limited to 'config-model/src/test/java/com/yahoo/schema/derived/TwoStreamingStructsTestCase.java')
-rw-r--r-- | config-model/src/test/java/com/yahoo/schema/derived/TwoStreamingStructsTestCase.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/derived/TwoStreamingStructsTestCase.java b/config-model/src/test/java/com/yahoo/schema/derived/TwoStreamingStructsTestCase.java new file mode 100644 index 00000000000..72411fa1770 --- /dev/null +++ b/config-model/src/test/java/com/yahoo/schema/derived/TwoStreamingStructsTestCase.java @@ -0,0 +1,34 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.schema.derived; + +import com.yahoo.schema.ApplicationBuilder; +import com.yahoo.schema.parser.ParseException; +import org.junit.Test; + +import java.io.IOException; + +/** + * Test structs for streaming with another unrelated .sd present + * + * @author arnej27959 + */ +public class TwoStreamingStructsTestCase extends AbstractExportingTestCase { + + @Test + public void testTwoStreamingStructsExporting() throws ParseException, IOException { + + String root = "src/test/derived/twostreamingstructs"; + ApplicationBuilder builder = new ApplicationBuilder(); + builder.addSchemaFile(root + "/streamingstruct.sd"); + builder.addSchemaFile(root + "/whatever.sd"); + builder.build(true); + assertCorrectDeriving(builder, builder.getSchema("streamingstruct"), root); + + builder = new ApplicationBuilder(); + builder.addSchemaFile(root + "/streamingstruct.sd"); + builder.addSchemaFile(root + "/whatever.sd"); + builder.build(true); + assertCorrectDeriving(builder, builder.getSchema("streamingstruct"), root); + } + +} |