@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"); }
@Test public void gettingRemovedTable() { provider.createTable("testRemove"); provider.removeTable("testRemove"); Assert.assertNull("should be null", provider.getTable("testRemove")); }
@Test(expected = IllegalArgumentException.class) public void creatingNullShouldFail() { provider.createTable(null); }