@Test public void testCreateSequence() { try { dbUtils.createSequence("TEST_SEQ1", 0); // $NON-NLS-1$ dbUtils.dropSequence("TEST_SEQ1"); // $NON-NLS-1$ } catch (SQLException e) { assertTrue(e.getMessage(), false); e.printStackTrace(); } }
@Test public void testExistSequence() { try { dbUtils.dropSequence("TEST_SEQ3"); // $NON-NLS-1$ boolean value = dbUtils.existSequence("TEST_SEQ3"); // $NON-NLS-1$ assertEquals(false, value); dbUtils.createSequence("TEST_SEQ3", 0); // $NON-NLS-1$ value = dbUtils.existSequence("TEST_SEQ3"); // $NON-NLS-1$ assertEquals(true, value); } catch (SQLException e) { assertTrue(e.getMessage(), false); e.printStackTrace(); } }
@Test public void testDropSequence() { try { dbUtils.dropSequence("TEST_SEQ2"); // $NON-NLS-1$ int value = dbUtils.getNext("TEST_SEQ2"); // $NON-NLS-1$ assertEquals(1, value); dbUtils.dropSequence("TEST_SEQ2"); // $NON-NLS-1$ value = dbUtils.getNext("TEST_SEQ2"); // $NON-NLS-1$ assertEquals(1, value); } catch (SQLException e) { assertTrue(e.getMessage(), false); e.printStackTrace(); } }