return new TypeSafeDiagnosingMatcher<Movie>() {
@Override
protected boolean matchesSafely(Movie movie, Description mismatchDescription) {
- if (!movie.getName().equals(name)) {
- mismatchDescription.appendText("movie is named ").appendValue(movie.getName());
+ if (!movie.name.equals(name)) {
+ mismatchDescription.appendText("movie is named ").appendValue(movie.name);
return false;
}
- if (!movie.getImageUrl().equals(imageUrl)) {
- mismatchDescription.appendText("image URL is ").appendValue(movie.getImageUrl());
+ if (!movie.imageUrl.equals(imageUrl)) {
+ mismatchDescription.appendText("image URL is ").appendValue(movie.imageUrl);
return false;
}
- if (!descriptionMatcher.matches(movie.getDescription())) {
- descriptionMatcher.describeMismatch(movie.getDescription(), mismatchDescription);
+ if (!descriptionMatcher.matches(movie.description)) {
+ descriptionMatcher.describeMismatch(movie.description, mismatchDescription);
return false;
}
- List<Performance> performances = new ArrayList<>(movie.getPerformances());
+ List<Performance> performances = new ArrayList<>(movie.performances);
if (performances.size() != presentationTimesTypesAndLinks.length) {
mismatchDescription.appendText("has ").appendValue(performances.size()).appendText(" presentations");
return false;