use of org.apache.jena.rdf.model.Alt in project jena by apache.
the class TestContainerConstructors method testCreateNamedAlt.
public void testCreateNamedAlt() {
final String uri = "http://aldabaran/sirius";
final Alt tv = model.createAlt(uri);
Assert.assertEquals(uri, tv.getURI());
Assert.assertTrue(model.contains(tv, RDF.type, RDF.Alt));
}
use of org.apache.jena.rdf.model.Alt in project jena by apache.
the class SecuredSeqTest method testGetAlt.
@Test
public void testGetAlt() {
try {
final Alt a = getSecuredSeq().getAlt(1);
Assert.assertTrue("Should be a secured Alt", a instanceof SecuredAlt);
if (!securityEvaluator.evaluate(Action.Read)) {
Assert.fail("Should have thrown ReadDeniedException Exception");
}
} catch (final ReadDeniedException e) {
if (securityEvaluator.evaluate(Action.Read)) {
Assert.fail(String.format("Should not have thrown ReadDeniedException Exception: %s - %s", e, e.getTriple()));
}
}
}
use of org.apache.jena.rdf.model.Alt in project jena by apache.
the class TestContainerConstructors method testCreateAnonAlt.
public void testCreateAnonAlt() {
final Alt tv = model.createAlt();
Assert.assertTrue(tv.isAnon());
Assert.assertTrue(model.contains(tv, RDF.type, RDF.Alt));
}
Aggregations