Пример #1
0
  @Test
  public void ifItsDifferentThereIsOther() {
    Criterion c =
        transactionService.runOnTransaction(
            new IOnTransaction<Criterion>() {

              @Override
              public Criterion execute() {
                return givenASavedCriterionWithAnExistentType();
              }
            });
    Criterion copy = Criterion.create(c.getName(), c.getType());
    assertTrue(criterionDAO.thereIsOtherWithSameNameAndType(copy));
  }
Пример #2
0
 private Criterion anotherCriterionWithSameNameAndType(Criterion c) {
   return Criterion.create(c.getName(), c.getType());
 }