Upgrade Truth to 0.30
IterableSubject is no longer generic, which improves readability in some callers. Change-Id: I948a356089f60f1f02f291a2f433eec67571424b
This commit is contained in:
@@ -31,7 +31,7 @@ public class GroupAssert {
|
||||
.that(actual.remove(g)).isTrue();
|
||||
}
|
||||
assert_().withFailureMessage("unexpected groups: " + actual)
|
||||
.that((Iterable<?>)actual).isEmpty();
|
||||
.that(actual).isEmpty();
|
||||
}
|
||||
|
||||
public static void assertGroupInfo(AccountGroup group, GroupInfo info) {
|
||||
|
||||
@@ -245,10 +245,8 @@ public class HashtagsIT extends AbstractDaemonTest {
|
||||
assertMessage(r, "Hashtag added: MyHashtag");
|
||||
}
|
||||
|
||||
private IterableSubject<
|
||||
? extends IterableSubject<?, String, Iterable<String>>,
|
||||
String, Iterable<String>>
|
||||
assertThatGet(PushOneCommit.Result r) throws Exception {
|
||||
private IterableSubject assertThatGet(PushOneCommit.Result r)
|
||||
throws Exception {
|
||||
return assertThat(gApi.changes()
|
||||
.id(r.getChange().getId().get())
|
||||
.getHashtags());
|
||||
|
||||
@@ -31,12 +31,8 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class ProjectAssert {
|
||||
public static IterableSubject<
|
||||
? extends IterableSubject<
|
||||
?, Project.NameKey, Iterable<Project.NameKey>>,
|
||||
Project.NameKey,
|
||||
Iterable<Project.NameKey>>
|
||||
assertThatNameList(Iterable<ProjectInfo> actualIt) {
|
||||
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();
|
||||
|
||||
@@ -397,7 +397,7 @@ public class CommentsIT extends AbstractDaemonTest {
|
||||
setApiUser(admin);
|
||||
Map<String, List<CommentInfo>> actual =
|
||||
gApi.changes().id(r1.getChangeId()).drafts();
|
||||
assertThat((Iterable<?>) actual.keySet()).containsExactly(FILE_NAME);
|
||||
assertThat(actual.keySet()).containsExactly(FILE_NAME);
|
||||
List<CommentInfo> comments = actual.get(FILE_NAME);
|
||||
assertThat(comments).hasSize(2);
|
||||
|
||||
|
||||
@@ -145,7 +145,6 @@ public class RepositoryConfigTest {
|
||||
RepositoryConfig.OWNER_GROUP_NAME, ownerGroups);
|
||||
}
|
||||
|
||||
@SuppressWarnings("cast")
|
||||
@Test
|
||||
public void testBasePathWhenNotConfigured() {
|
||||
assertThat((Object)repoCfg.getBasePath(new NameKey("someProject"))).isNull();
|
||||
@@ -159,7 +158,6 @@ public class RepositoryConfigTest {
|
||||
.isEqualTo(basePath);
|
||||
}
|
||||
|
||||
@SuppressWarnings("cast")
|
||||
@Test
|
||||
public void testBasePathForSpecificFilter() {
|
||||
String basePath = "/someAbsolutePath/someDirectory";
|
||||
|
||||
4
lib/BUCK
4
lib/BUCK
@@ -246,8 +246,8 @@ maven_jar(
|
||||
|
||||
maven_jar(
|
||||
name = 'truth',
|
||||
id = 'com.google.truth:truth:0.28',
|
||||
sha1 = '0a388c7877c845ff4b8e19689dda5ac9d34622c4',
|
||||
id = 'com.google.truth:truth:0.30',
|
||||
sha1 = '9d591b5a66eda81f0b88cf1c748ab8853d99b18b',
|
||||
license = 'DO_NOT_DISTRIBUTE',
|
||||
exported_deps = [
|
||||
':guava',
|
||||
|
||||
Reference in New Issue
Block a user