Search in sources :

Example 6 with IlscriptsConfig

use of com.yahoo.vespa.configdefinition.IlscriptsConfig in project vespa by vespa-engine.

the class ScriptManagerTestCase method requireThatUnknownDocumentTypeReturnsNull.

@Test
public void requireThatUnknownDocumentTypeReturnsNull() {
    DocumentTypeManager typeMgr = new DocumentTypeManager();
    typeMgr.configure("file:src/test/cfg/documentmanager_inherit.cfg");
    ScriptManager scriptMgr = new ScriptManager(typeMgr, new IlscriptsConfig(new IlscriptsConfig.Builder()), null);
    for (Iterator<DocumentType> it = typeMgr.documentTypeIterator(); it.hasNext(); ) {
        assertNull(scriptMgr.getScript(it.next()));
    }
    assertNull(scriptMgr.getScript(new DocumentType("unknown")));
}
Also used : IlscriptsConfig(com.yahoo.vespa.configdefinition.IlscriptsConfig) DocumentTypeManager(com.yahoo.document.DocumentTypeManager) DocumentType(com.yahoo.document.DocumentType) Test(org.junit.Test)

Aggregations

IlscriptsConfig (com.yahoo.vespa.configdefinition.IlscriptsConfig)6 Test (org.junit.Test)5 DocumentType (com.yahoo.document.DocumentType)4 DocumentTypeManager (com.yahoo.document.DocumentTypeManager)4 IndexInfoConfig (com.yahoo.search.config.IndexInfoConfig)1 AttributesConfig (com.yahoo.vespa.config.search.AttributesConfig)1 ProtonConfig (com.yahoo.vespa.config.search.core.ProtonConfig)1 ScriptParserContext (com.yahoo.vespa.indexinglanguage.ScriptParserContext)1 InputExpression (com.yahoo.vespa.indexinglanguage.expressions.InputExpression)1 ScriptExpression (com.yahoo.vespa.indexinglanguage.expressions.ScriptExpression)1 StatementExpression (com.yahoo.vespa.indexinglanguage.expressions.StatementExpression)1 VespaModel (com.yahoo.vespa.model.VespaModel)1 ContentSearchCluster (com.yahoo.vespa.model.content.ContentSearchCluster)1 IndexedSearchCluster (com.yahoo.vespa.model.search.IndexedSearchCluster)1 VespaModelCreatorWithMockPkg (com.yahoo.vespa.model.test.utils.VespaModelCreatorWithMockPkg)1