Search in sources :

Example 1 with DatasetHandler

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

the class DatasetClauseTest method testGetDatasetHandler.

@ContractTest
public void testGetDatasetHandler() {
    DatasetClause<?> datasetClause = getProducer().newInstance();
    DatasetHandler dsHandler = datasetClause.getDatasetHandler();
    assertNotNull(dsHandler);
}
Also used : DatasetHandler(org.apache.jena.arq.querybuilder.handlers.DatasetHandler) ContractTest(org.xenei.junit.contract.ContractTest)

Example 2 with DatasetHandler

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

the class DatasetHandlerTest method testAddAll.

@Test
public void testAddAll() {
    DatasetHandler handler2 = new DatasetHandler(new Query());
    handler2.from("foo");
    handler2.fromNamed("bar");
    handler.addAll(handler2);
    String s = query.toString();
    assertTrue(s.contains("FROM <foo>"));
    assertTrue(s.contains("FROM NAMED <bar>"));
}
Also used : Query(org.apache.jena.query.Query) DatasetHandler(org.apache.jena.arq.querybuilder.handlers.DatasetHandler) Test(org.junit.Test)

Example 3 with DatasetHandler

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

the class DatasetHandlerTest method setup.

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

Aggregations

DatasetHandler (org.apache.jena.arq.querybuilder.handlers.DatasetHandler)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