@Test public void getValidKey() throws Exception { Assert.assertNull(dataTable.get("one")); Storeable value = new StoreableDataValue(types); value.setColumnAt(0, 5); value.setColumnAt(1, "book"); dataTable.put("favourite", value); Assert.assertEquals(dataTable.get("favourite"), value); }
@Test(expected = IllegalArgumentException.class) public void getNullKeyShouldFail() throws Exception { dataTable.get(null); }
@Test(expected = IllegalStateException.class) public void closeTableGetShouldFail() throws Exception { dataTable.close(); dataTable.get("key"); }