コード例 #1
0
  @Test
  public void testEmpty() {
    res = new ValidationResult();
    assertFalse(res.hasFailures());

    assertFalse(res.hasFailures(obj1));
    assertFalse(res.hasFailures(null));
  }
コード例 #2
0
 @Test
 public void testHasFailures() {
   res = new ValidationResult();
   res.addFailure(new BeanValidationFailure(obj1, "obj1 1", "mes obj1 1"));
   assertTrue(res.hasFailures());
   assertTrue(res.hasFailures(obj1));
   assertFalse(res.hasFailures(obj2));
 }