{ // validation errors
List<ValidationMarker> problems = model3.getProblems();
assertThat(problems.size(), is(3));
{ // problem 1
ValidationMarker problem1 = problems.get(0);
assertThat(problem1.getSeverity(), is(Severity.ERROR));
assertThat(problem1.getPath(), is("BOOKS"));
assertThat(problem1.getMessage(),
is("The name BOOKS is the same (ignoring case) as 1 other object(s) under the same parent"));
}
{ // problem 2
ValidationMarker problem2 = problems.get(1);
assertThat(problem2.getSeverity(), is(Severity.ERROR));
assertThat(problem2.getPath(), is("BOOKS"));
assertThat(problem2.getMessage(), is("Group does not exist: MyBooksView.BOOKS"));
}
{ // problem 3
ValidationMarker problem3 = problems.get(2);
assertThat(problem3.getSeverity(), is(Severity.ERROR));
assertThat(problem3.getPath(), is("BOOKS"));
assertThat(problem3.getMessage(),
is("The name BOOKS is the same (ignoring case) as 1 other object(s) under the same parent"));
}
}
}
}