@Override public void close() { graph.close() ; }
/** * Free all resources, any further use of this Graph is an error. */ @Override public void close() { if (!closed) { fdata.getGraph().close(); fdata = null; super.close(); } }
protected Graph getClosed() { Graph result = getGraph(); result.close(); return result; }
@Override final public void cleanUp() { for (Graph g : graphList) { if (!g.isClosed()) { GraphHelper.txnBegin(g); g.close(); GraphHelper.txnCommit(g); } afterClose(g); } graphList.clear(); }
/** * Test that we *can* open a graph that hasn't been created */ @ContractTest public void testCanOpenUncreated() { String name = jName("willBeCreated"); Graph g1 = graphMaker.openGraph(name); g1.close(); graphMaker.openGraph(name, true); }
/** A trivial test that getGraph delivers a proper graph, not cheating with null, and that getGraph() "always" delivers the same Graph. */ public void testGetGraph() { Graph g1 = gf.getGraph(); assertFalse( "should deliver a Graph", g1 == null ); assertSame( g1, gf.getGraph() ); g1.close(); }
/** * Foo trivial test that getGraph delivers a proper graph, not cheating with * null, and that getGraph() "always" delivers the same Graph. */ @ContractTest public void testGetGraph() { Graph g1 = graphMaker.getGraph(); assertFalse("should deliver a Graph", g1 == null); assertSame(g1, graphMaker.getGraph()); g1.close(); }
public void testCloseSetsIsClosed() { Graph g = getGraph(); assertFalse( "unclosed Graph shouild not be isClosed()", g.isClosed() ); g.close(); assertTrue( "closed Graph should be isClosed()", g.isClosed() ); }
/** * Foo trivial test that getGraph delivers a proper graph, not cheating with * null, and that getGraph() "always" delivers the same Graph. */ @ContractTest public void testGetGraph() { Graph g1 = graphMaker.getGraph(); assertFalse("should deliver a Graph", g1 == null); assertSame(g1, graphMaker.getGraph()); g1.close(); }