blob: 254ed26df3634ed1c352d553aff00c45137995b5 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.derived;
import com.yahoo.config.model.application.provider.MockFileRegistry;
import com.yahoo.config.model.deploy.TestProperties;
import com.yahoo.io.IOUtils;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.SearchBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
/**
* @author bratseth
*/
public class SchemaInheritanceTestCase extends AbstractExportingTestCase {
@Test
public void testIt() throws IOException, ParseException {
try {
SearchBuilder builder = SearchBuilder.createFromDirectory("src/test/derived/schemainheritance/",
new MockFileRegistry(),
new TestableDeployLogger(),
new TestProperties());
derive("schemainheritance", builder, builder.getSearch("child"));
assertCorrectConfigFiles("schemainheritance");
}
finally {
IOUtils.recursiveDeleteDir(new File("src/test/derived/schemainheritance/models.generated/"));
}
}
}
|