コード例 #1
0
 @Test(expected = IllegalStateException.class)
 public void testWorkingWithTableFromClosedDatabase() throws Exception {
   MyTableProvider provider1 = new MyTableProvider("database2");
   MyTable table = provider1.createTable("newTable", typeList);
   provider1.close();
   table.size();
 }
コード例 #2
0
 @Test
 public void testGetClosedTable() throws Exception {
   MyTable table = provider.createTable("closed", typeList);
   table.close();
   MyTable newTable = provider.getTable("closed");
   Assert.assertFalse(newTable.equals(table));
   Assert.assertNotNull(newTable);
 }