Search in sources :

Example 1 with Node_URI

use of org.apache.jena.graph.Node_URI in project jena by apache.

the class GraphMem_CS method testUnnecessaryMatches.

@ContractTest
public void testUnnecessaryMatches() {
    Node special = new Node_URI("eg:foo") {

        @Override
        public boolean matches(Node s) {
            fail("Matched called superfluously.");
            return true;
        }
    };
    Graph g = graphWith(graphProducer.newInstance(), "x p y");
    g.add(new Triple(special, special, special));
    exhaust(g.find(special, Node.ANY, Node.ANY));
    exhaust(g.find(Node.ANY, special, Node.ANY));
    exhaust(g.find(Node.ANY, Node.ANY, special));
}
Also used : Node_URI(org.apache.jena.graph.Node_URI) Triple(org.apache.jena.graph.Triple) Graph(org.apache.jena.graph.Graph) Node(org.apache.jena.graph.Node) ContractTest(org.xenei.junit.contract.ContractTest)

Aggregations

Graph (org.apache.jena.graph.Graph)1 Node (org.apache.jena.graph.Node)1 Node_URI (org.apache.jena.graph.Node_URI)1 Triple (org.apache.jena.graph.Triple)1 ContractTest (org.xenei.junit.contract.ContractTest)1