示例#1
0
  @Test
  public void executeQuery() {
    logger.info("     INIT executeQuery()");

    IntPerfiles intPerfiles = new IntPerfiles("PRU", "Perfil de Prueba");

    try {
      // insert
      _insert(intPerfiles);

      // executeQuery
      List<IntPerfiles> intPerfiless = intPerfilesBO.executeQuery("from IntPerfiles");
      if (intPerfiless != null && !intPerfiless.isEmpty()) {
        Iterator<IntPerfiles> iterador = intPerfiless.iterator();
        while (iterador.hasNext()) {
          logger.debug("          " + iterador.next().toString());
        }
      } else {
        Assert.fail("          [SIN RESULTADOS]");
      }

      // deleteById
      _deleteById(intPerfiles);

    } catch (ParentDAOException pde) {
      Assert.fail(pde.toString());
    } catch (ParentBOException pbe) {
      Assert.fail(pbe.toString());
    }
    Assert.assertTrue(true);
    logger.info("     END executeQuery()");
  }
示例#2
0
  @Test
  public void selectById() {
    logger.info("     INIT selectById()");

    IntPerfiles intPerfiles = new IntPerfiles("PRU", "Perfil de Prueba");

    try {
      // insert
      _insert(intPerfiles);

      // selectById
      intPerfiles = intPerfilesBO.selectById(intPerfiles);
      if (intPerfiles != null) {
        logger.debug("          " + intPerfiles.toString());
      } else {
        Assert.fail("          [SIN RESULTADOS]");
      }

      // deleteById
      _deleteById(intPerfiles);

    } catch (ParentDAOException pde) {
      Assert.fail(pde.toString());
    } catch (ParentBOException pbe) {
      Assert.fail(pbe.toString());
    }
    Assert.assertTrue(true);
    logger.info("     END selectById()");
  }
示例#3
0
  @Test
  public void insert() {
    logger.info("     INIT insert()");

    IntPerfiles intPerfiles = new IntPerfiles("PRU", "Perfil de Prueba");

    try {
      // insert
      _insert(intPerfiles);

      // deleteById
      _deleteById(intPerfiles);
    } catch (ParentDAOException pde) {
      Assert.fail(pde.toString());
    } catch (ParentBOException pbe) {
      Assert.fail(pbe.toString());
    }
    Assert.assertTrue(true);
    logger.info("     END insert()");
  }