use of org.apache.jena.tdb.store.NodeId in project jena by apache.
the class AbstractTestNodeTableTrans method nodetrans_04.
@Test
public void nodetrans_04() {
Transaction txn = createTxn(11);
NodeTableTrans ntt = create(txn, node1);
NodeTable nt0 = ntt.getBaseNodeTable();
ntt.begin(txn);
// Add a node
NodeId nodeId = ntt.getAllocateNodeId(node2);
// Not here
assertEquals(NodeId.NodeDoesNotExist, nt0.getNodeIdForNode(node2));
// Is here
assertEquals(nodeId, ntt.getNodeIdForNode(node2));
ntt.commitPrepare(txn);
ntt.commitEnact(txn);
assertEquals(nodeId, nt0.getNodeIdForNode(node2));
ntt.commitClearup(txn);
}
Aggregations