@Test public void testGraph_write() throws GraphException, SQLException, JSONException { writeToGraph(); assertEquals(CAPACITY, graph.capacity()); assertEquals(CAPACITY, graph.occupied()); assertEquals(0, graph.available()); assertEquals(0, graph.recycled()); }
@Test public void testClearAllGraphData() throws JSONException, GraphException, InterruptedException, SQLException { testGraph(); graph.clear(); assertEquals(0, graph.occupied()); assertEquals(CAPACITY, graph.capacity()); assertEquals(CAPACITY, graph.available()); }
@Test public void testGraph_delete() throws GraphException, SQLException, JSONException { testGraph_write(); for (int i = 0; i < CAPACITY; i++) { graph.delete(String.valueOf(i)); assertNull(graph.read(String.valueOf(i))); } assertEquals(CAPACITY, graph.capacity()); assertEquals(0, graph.occupied()); assertEquals(CAPACITY, graph.available()); assertEquals(CAPACITY, graph.recycled()); }
@Test public void testGraph() throws JSONException, GraphException, InterruptedException, SQLException { writeToGraph(); assertEquals(CAPACITY, graph.occupied()); }