Ejemplo n.º 1
0
  /**
   * Test the suppression of an entity TABLE.<br>
   *
   * <ul>
   *   <li>Step 1 : Create an entity
   *   <li>Step 2 : Delete the entity
   *   <li>Step 3 : Search the entity and verify it doesn't exist anymore
   * </ul>
   *
   * @throws DaoException if an unexpected DAO exception occurs.
   */
  public final void testDeleteTABLE() throws DaoException {
    // Initialized the test
    TABLE tABLE = getTABLEExample();
    tABLEDao.createTABLE(tABLE);

    // Execute the tested code
    tABLEDao.deleteTABLE(tABLE);

    // Verify result
    boolean found = false;
    for (TABLE currentTABLE : tABLEDao.findAllTABLEs()) {
      if (currentTABLE.getId().equals(tABLE.getId())) {
        found = true;
      }
    }
    Assert.assertFalse("TABLE not deleted", found);
  }