Search in sources :

Example 1 with RuleBaseException

use of com.yahoo.prelude.semantics.RuleBaseException in project vespa by vespa-engine.

the class DuplicateRuleTestCase method testDuplicateRuleBaseLoading.

public void testDuplicateRuleBaseLoading() throws java.io.IOException, ParseException {
    // TODO: Include this test...
    if (System.currentTimeMillis() > 0)
        return;
    try {
        new RuleImporter().importFile(root + "rules.sr");
        fail("Did not detect duplicate condition names");
    } catch (RuleBaseException e) {
        assertEquals("Duplicate condition 'something' in 'duplicaterules.sr'", e.getMessage());
    }
}
Also used : RuleBaseException(com.yahoo.prelude.semantics.RuleBaseException) RuleImporter(com.yahoo.prelude.semantics.RuleImporter)

Aggregations

RuleBaseException (com.yahoo.prelude.semantics.RuleBaseException)1 RuleImporter (com.yahoo.prelude.semantics.RuleImporter)1