Search in sources :

Example 1 with Name

use of org.whole.lang.grammars.model.Name in project whole by wholeplatform.

the class RewriteQueriesTest method testDelete2.

@Test
public void testDelete2() {
    Grammar model = new TestXmlGrammar().create();
    ITemplateManager tm = RewriteQueriesTemplateManager.instance();
    PathExpression query = (PathExpression) tm.create("delete2");
    for (Name name : BehaviorUtils.<Name>compileAndLazyEvaluate(query, model)) assertTrue(Matcher.match(GrammarsEntityDescriptorEnum.Name, name));
    for (IEntity name : BehaviorUtils.compileAndLazyEvaluate(query, model)) assertTrue(EntityUtils.isResolver(name));
}
Also used : PathExpression(org.whole.lang.queries.model.PathExpression) IEntity(org.whole.lang.model.IEntity) TestXmlGrammar(org.whole.lang.grammars.util.TestXmlGrammar) ITemplateManager(org.whole.lang.templates.ITemplateManager) TestXmlGrammar(org.whole.lang.grammars.util.TestXmlGrammar) Grammar(org.whole.lang.grammars.model.Grammar) Name(org.whole.lang.grammars.model.Name) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Grammar (org.whole.lang.grammars.model.Grammar)1 Name (org.whole.lang.grammars.model.Name)1 TestXmlGrammar (org.whole.lang.grammars.util.TestXmlGrammar)1 IEntity (org.whole.lang.model.IEntity)1 PathExpression (org.whole.lang.queries.model.PathExpression)1 ITemplateManager (org.whole.lang.templates.ITemplateManager)1