use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method delete_01.
@Test
public void delete_01() {
DatasetAccessor du = connectToService();
du.deleteDefault();
}
use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method get_03.
// Dataset direct, not using the service endpoint.
@Test
public void get_03() {
DatasetAccessor du = connectToDataset();
Model graph = du.getModel();
assertTrue(graph.isEmpty());
}
use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method delete_04.
@Test
public void delete_04() {
DatasetAccessor du = connectToDataset();
du.deleteModel(gn1);
boolean exists = du.containsModel(gn1);
assertFalse("Expected gn1 not to exist", exists);
}
use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method put_04.
@Test
public void put_04() {
DatasetAccessor du = connectToDataset();
du.putModel(model1);
Model graph = du.getModel();
assertTrue(graph.isIsomorphicWith(model1));
// Empty it.
du.deleteDefault();
graph = du.getModel();
assertTrue(graph.isEmpty());
}
use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestAuth method graphstore_with_auth_03.
@Test
public void graphstore_with_auth_03() {
// Correct auth credentials
DatasetAccessor accessor = DatasetAccessorFactory.createHTTP(authServiceREST, withBasicAuth(ANY, "allowed", "password"));
Model m = accessor.getModel();
Assert.assertTrue(m.isEmpty());
}
Aggregations