blob: 737086cda27c57fa64372ad1dfa7350145a9b283 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.derived;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
/**
* Tests VSM configuration deriving for structs
*
* @author bratseth
*/
public class StreamingStructTestCase extends AbstractExportingTestCase {
@Test
public void testStreamingStruct() throws IOException, ParseException {
assertCorrectDeriving("streamingstruct");
}
@Test
public void testStreamingStructExplicitDefaultSummaryClass() throws IOException, ParseException {
// Tests an issue for mail in Vespa 4.1; specific overrides of default summary class
assertCorrectDeriving("streamingstructdefault");
}
@Test
public void testStreamingStructDocumentsonlyDeriving() throws IOException {
String root = "src/test/derived/streamingstruct/";
String temp = "temp/documentderiver/";
new File(temp).mkdir();
Deriver.deriveDocuments(Arrays.asList(root + "streamingstruct.sd"), temp);
assertEqualFiles(root + "/onlydoc/documentmanager.cfg",
temp + "/documentmanager.cfg");
}
}
|