コード例 #1
0
 @Test
 public void F_findByIdTest_2() throws Exception {
   IRimborsoKmSearchBuilder rimborsoKmSearchBuilder =
       IRimborsoKmSearchBuilder.RimborsoKmSearchBuilder.getRimborsoKmSearchBuilder().withId("02");
   List<RimborsoKm> lista =
       rimborsoKmDAO.findRimborsoKmByQuery(rimborsoKmSearchBuilder).getResults();
   Assert.assertTrue("FIND RIMBORSO KM BY ID", lista.isEmpty());
 }
コード例 #2
0
  @Test
  public void C_updateRimborsoKmTest() throws Exception {
    RimborsoKm rimborsoKm =
        rimborsoKmDAO
            .findRimborsoKmByQuery(
                IRimborsoKmSearchBuilder.RimborsoKmSearchBuilder.getRimborsoKmSearchBuilder())
            .getResults()
            .get(0);
    rimborsoKm.setValue(0.40);
    Thread.sleep(1000);
    rimborsoKmDAO.update(rimborsoKm);
    Thread.sleep(1000);
    logger.debug(
        "############################NUMBER_ALL_RIMBORSO_KM: {}\n",
        rimborsoKmDAO.count().intValue());

    IRimborsoKmSearchBuilder rimborsoKmSearchBuilder =
        IRimborsoKmSearchBuilder.RimborsoKmSearchBuilder.getRimborsoKmSearchBuilder();
    List<RimborsoKm> lista =
        rimborsoKmDAO.findRimborsoKmByQuery(rimborsoKmSearchBuilder).getResults();
    Assert.assertTrue("FIND RIMBORSO KM", lista.size() == 1);
  }