use of com.yahoo.document.DocumenttypesConfig in project vespa by vespa-engine.
the class DocumentModelBuilderReferenceTypeTestCase method assertDocumenttypesCfg.
private void assertDocumenttypesCfg(DocumentModel model, String documenttypesCfgFile) throws IOException {
DocumenttypesConfig.Builder documenttypesCfg = new DocumentTypes().produce(model, new DocumenttypesConfig.Builder());
assertConfigFile(TEST_FOLDER + documenttypesCfgFile, new DocumenttypesConfig(documenttypesCfg).toString());
}
use of com.yahoo.document.DocumenttypesConfig in project vespa by vespa-engine.
the class DocumentModelBuilderTestCase method testDocumentTypesSimple.
@Test
public // This is ignored as enums in config are not testable in this way. See bug 4748050
void testDocumentTypesSimple() throws IOException, ParseException {
DocumentModel model = createAndTestModel("src/test/configmodel/types/types.sd");
DocumenttypesConfig.Builder documenttypesCfg = new DocumentTypes().produce(model, new DocumenttypesConfig.Builder());
assertConfigFile("src/test/configmodel/types/documenttypes.cfg", new DocumenttypesConfig(documenttypesCfg).toString());
}
use of com.yahoo.document.DocumenttypesConfig in project vespa by vespa-engine.
the class DocumentModelBuilderTestCase method testDocumentTypesWithDocumentField.
@Test
public void testDocumentTypesWithDocumentField() throws IOException, ParseException {
SearchBuilder search = new SearchBuilder();
search.importFile("src/test/configmodel/types/other_doc.sd");
search.importFile("src/test/configmodel/types/type_with_doc_field.sd");
search.build();
DocumentModel model = search.getModel();
DocumenttypesConfig.Builder documenttypesCfg = new DocumentTypes().produce(model, new DocumenttypesConfig.Builder());
assertConfigFile("src/test/configmodel/types/documenttypes_with_doc_field.cfg", new DocumenttypesConfig(documenttypesCfg).toString());
}
Aggregations