Search in sources :

Example 1 with PrologHandler

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

the class PrologClauseTest method testGetPrologHandler.

@ContractTest
public void testGetPrologHandler() {
    PrologClause<?> prologClause = getProducer().newInstance();
    PrologHandler handler = prologClause.getPrologHandler();
    assertNotNull(handler);
}
Also used : PrologHandler(org.apache.jena.arq.querybuilder.handlers.PrologHandler) ContractTest(org.xenei.junit.contract.ContractTest)

Example 2 with PrologHandler

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

the class PrologHandlerTest method setup.

@Before
public void setup() {
    query = new Query();
    handler = new PrologHandler(query);
}
Also used : Query(org.apache.jena.query.Query) PrologHandler(org.apache.jena.arq.querybuilder.handlers.PrologHandler) Before(org.junit.Before)

Example 3 with PrologHandler

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

the class PrologHandlerTest method testAddPrefixHandler.

@Test
public void testAddPrefixHandler() {
    PrologHandler handler2 = new PrologHandler(new Query());
    handler2.addPrefix("pfx", "uri");
    handler.addAll(handler2);
    String[] lst = byLine(query.toString());
    assertContainsRegex("PREFIX\\s+pfx:\\s+\\<uri\\>", lst);
}
Also used : Query(org.apache.jena.query.Query) PrologHandler(org.apache.jena.arq.querybuilder.handlers.PrologHandler) Test(org.junit.Test)

Aggregations

PrologHandler (org.apache.jena.arq.querybuilder.handlers.PrologHandler)3 Query (org.apache.jena.query.Query)2 Before (org.junit.Before)1 Test (org.junit.Test)1 ContractTest (org.xenei.junit.contract.ContractTest)1