Search in sources :

Example 6 with WhereHandler

use of org.apache.jena.arq.querybuilder.handlers.WhereHandler in project jena by apache.

the class ExprFactoryTest method existsTest.

// expr op
@Test
public void existsTest() {
    WhereHandler handler = new WhereHandler(new Query());
    WhereClause<?> whereClause = mock(WhereClause.class);
    when(whereClause.getWhereHandler()).thenReturn(handler);
    Expr e = factory.exists(whereClause);
    assertTrue(e instanceof E_Exists);
}
Also used : Query(org.apache.jena.query.Query) WhereHandler(org.apache.jena.arq.querybuilder.handlers.WhereHandler) Test(org.junit.Test)

Example 7 with WhereHandler

use of org.apache.jena.arq.querybuilder.handlers.WhereHandler in project jena by apache.

the class ExprFactoryTest method notexistsTest.

@Test
public void notexistsTest() {
    WhereHandler handler = new WhereHandler(new Query());
    WhereClause<?> whereClause = mock(WhereClause.class);
    when(whereClause.getWhereHandler()).thenReturn(handler);
    Expr e = factory.notexists(whereClause);
    assertTrue(e instanceof E_NotExists);
}
Also used : Query(org.apache.jena.query.Query) WhereHandler(org.apache.jena.arq.querybuilder.handlers.WhereHandler) Test(org.junit.Test)

Aggregations

WhereHandler (org.apache.jena.arq.querybuilder.handlers.WhereHandler)7 Query (org.apache.jena.query.Query)7 Test (org.junit.Test)6 Triple (org.apache.jena.graph.Triple)4 TriplePath (org.apache.jena.sparql.core.TriplePath)4 Node (org.apache.jena.graph.Node)1 Var (org.apache.jena.sparql.core.Var)1 Before (org.junit.Before)1