@Test public void size_tableOneAddedItem_returnsFive() throws SQLException { Connection conn = connectionPool.reserveConnection(); Statement statement = conn.createStatement(); if (SQLTestsConstants.db == DB.MSSQL) { statement.executeUpdate("insert into people values('Bengt', 30)"); } else { statement.executeUpdate("insert into people values(default, 'Bengt', 30)"); } statement.close(); conn.commit(); connectionPool.releaseConnection(conn); assertEquals(5, container.size()); }
@After public void tearDown() { if (connectionPool != null) { connectionPool.destroy(); } }