use of com.google.common.truth.IterableSubject in project gerrit by GerritCodeReview.
the class ProjectAssert method assertThatNameList.
public static IterableSubject assertThatNameList(Iterable<ProjectInfo> actualIt) {
List<ProjectInfo> actual = ImmutableList.copyOf(actualIt);
for (ProjectInfo info : actual) {
assertWithMessage("missing project name").that(info.name).isNotNull();
assertWithMessage("project name does not match id").that(Url.decode(info.id)).isEqualTo(info.name);
}
return assertThat(Iterables.transform(actual, p -> new Project.NameKey(p.name)));
}
Aggregations