コード例 #1
0
 @Test
 public void gettingCreatedTable() {
   Table created = provider.createTable("testGet");
   Table firstGet = provider.getTable("testGet");
   Table secondGet = provider.getTable("testGet");
   Assert.assertEquals("should be testGet", "testGet", provider.getTable("testGet").getName());
   Assert.assertSame("getting should returns the same table as create", created, firstGet);
   Assert.assertSame("getting the same table twice should return the same", firstGet, secondGet);
   provider.removeTable("testGet");
 }
コード例 #2
0
 @Test
 public void gettingRemovedTable() {
   provider.createTable("testRemove");
   provider.removeTable("testRemove");
   Assert.assertNull("should be null", provider.getTable("testRemove"));
 }
コード例 #3
0
 @Test(expected = IllegalArgumentException.class)
 public void creatingNullShouldFail() {
   provider.createTable(null);
 }