Search in sources :

Example 6 with TransactionHandler

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

the class TestSpecials method sink_graph_txn_2.

@Test
public void sink_graph_txn_2() {
    DatasetGraph dsg = DatasetGraphSink.create();
    Graph g = dsg.getDefaultGraph();
    TransactionHandler h = g.getTransactionHandler();
    h.begin();
    h.abort();
}
Also used : Graph(org.apache.jena.graph.Graph) TransactionHandler(org.apache.jena.graph.TransactionHandler) Test(org.junit.Test)

Example 7 with TransactionHandler

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

the class TestSpecials method zero_graph_txn_4.

@Test(expected = JenaException.class)
public void zero_graph_txn_4() {
    DatasetGraph dsg = DatasetGraphZero.create();
    Graph g = dsg.getDefaultGraph();
    TransactionHandler h = g.getTransactionHandler();
    h.begin();
    h.commit();
    h.abort();
}
Also used : Graph(org.apache.jena.graph.Graph) TransactionHandler(org.apache.jena.graph.TransactionHandler) Test(org.junit.Test)

Example 8 with TransactionHandler

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

the class TestSpecials method sink_graph_txn_4.

@Test(expected = JenaException.class)
public void sink_graph_txn_4() {
    DatasetGraph dsg = DatasetGraphSink.create();
    Graph g = dsg.getDefaultGraph();
    TransactionHandler h = g.getTransactionHandler();
    h.begin();
    h.commit();
    h.abort();
}
Also used : Graph(org.apache.jena.graph.Graph) TransactionHandler(org.apache.jena.graph.TransactionHandler) Test(org.junit.Test)

Example 9 with TransactionHandler

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

the class TestSpecials method zero_graph_txn_2.

@Test
public void zero_graph_txn_2() {
    DatasetGraph dsg = DatasetGraphZero.create();
    Graph g = dsg.getDefaultGraph();
    TransactionHandler h = g.getTransactionHandler();
    h.begin();
    h.abort();
}
Also used : Graph(org.apache.jena.graph.Graph) TransactionHandler(org.apache.jena.graph.TransactionHandler) Test(org.junit.Test)

Example 10 with TransactionHandler

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

the class TestSpecials method sink_graph_txn_5.

@Test(expected = JenaException.class)
public void sink_graph_txn_5() {
    DatasetGraph dsg = DatasetGraphSink.create();
    Graph g = dsg.getDefaultGraph();
    TransactionHandler h = g.getTransactionHandler();
    h.commit();
}
Also used : Graph(org.apache.jena.graph.Graph) TransactionHandler(org.apache.jena.graph.TransactionHandler) Test(org.junit.Test)

Aggregations

TransactionHandler (org.apache.jena.graph.TransactionHandler)11 Graph (org.apache.jena.graph.Graph)8 Test (org.junit.Test)8 Command (org.apache.jena.shared.Command)2 ContractTest (org.xenei.junit.contract.ContractTest)2 JenaException (org.apache.jena.shared.JenaException)1