Upgrade Truth to 0.35
Includes an override assertThat(Path) that avoids the ambiguity between the Object and Comparable overrides, allowing us to remove ugly casts in our code. (Amusingly, PathSubject actually has no more methods yet, it literally just exists to avoid this ugliness.) Change-Id: I960227c074bb962e387ca47e0d80d4645027e108
This commit is contained in:
parent
75868b091c
commit
f02f1abe42
@ -716,18 +716,18 @@ maven_jar(
|
||||
sha1 = "4785a3c21320980282f9f33d0d1264a69040538f",
|
||||
)
|
||||
|
||||
TRUTH_VERS = "0.34"
|
||||
TRUTH_VERS = "0.35"
|
||||
|
||||
maven_jar(
|
||||
name = "truth",
|
||||
artifact = "com.google.truth:truth:" + TRUTH_VERS,
|
||||
sha1 = "73379200e907386d27eb10da60c5c2ed339f2bec",
|
||||
sha1 = "c08a7fde45e058323bcfa3f510d4fe1e2b028f37",
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
name = "truth-java8-extension",
|
||||
artifact = "com.google.truth.extensions:truth-java8-extension:" + TRUTH_VERS,
|
||||
sha1 = "2d4aa36f7c048805af211406c4da4ddd1de15474",
|
||||
sha1 = "5457fdf91b1e954b070ad7f2db9bea5505da4bca",
|
||||
)
|
||||
|
||||
# When bumping the easymock version number, make sure to also move powermock to a compatible version
|
||||
|
@ -15,6 +15,7 @@
|
||||
package com.google.gerrit.server.config;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.gerrit.extensions.client.SubmitType;
|
||||
@ -147,7 +148,7 @@ public class RepositoryConfigTest {
|
||||
|
||||
@Test
|
||||
public void basePathWhenNotConfigured() {
|
||||
assertThat((Object) repoCfg.getBasePath(new NameKey("someProject"))).isNull();
|
||||
assertThat(repoCfg.getBasePath(new NameKey("someProject"))).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -161,7 +162,7 @@ public class RepositoryConfigTest {
|
||||
public void basePathForSpecificFilter() {
|
||||
String basePath = "/someAbsolutePath/someDirectory";
|
||||
configureBasePath("someProject", basePath);
|
||||
assertThat((Object) repoCfg.getBasePath(new NameKey("someOtherProject"))).isNull();
|
||||
assertThat(repoCfg.getBasePath(new NameKey("someOtherProject"))).isNull();
|
||||
assertThat(repoCfg.getBasePath(new NameKey("someProject")).toString()).isEqualTo(basePath);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user