diff --git a/javatests/com/google/gerrit/plugins/codeowners/backend/AbstractFileBasedCodeOwnerBackendTest.java b/javatests/com/google/gerrit/plugins/codeowners/backend/AbstractFileBasedCodeOwnerBackendTest.java index 7ec92959c..9dcadd85a 100644 --- a/javatests/com/google/gerrit/plugins/codeowners/backend/AbstractFileBasedCodeOwnerBackendTest.java +++ b/javatests/com/google/gerrit/plugins/codeowners/backend/AbstractFileBasedCodeOwnerBackendTest.java @@ -15,10 +15,10 @@ package com.google.gerrit.plugins.codeowners.backend; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import static com.google.gerrit.plugins.codeowners.testing.CodeOwnerConfigSubject.assertThatOptional; import static com.google.gerrit.testing.GerritJUnit.assertThrows; +import com.google.common.truth.Truth8; import com.google.gerrit.acceptance.config.GerritConfig; import com.google.gerrit.common.Nullable; import com.google.gerrit.entities.BranchNameKey; @@ -476,7 +476,7 @@ public void cannotUpdateCodeOwnerConfigInNonExistingBranch() throws Exception { @Test public void getFilePathForCodeOwnerConfigKeyWithoutFileName() throws Exception { CodeOwnerConfig.Key codeOwnerConfigKey = CodeOwnerConfig.Key.create(project, "master", "/"); - assertThat(codeOwnerBackend.getFilePath(codeOwnerConfigKey)) + Truth8.assertThat(codeOwnerBackend.getFilePath(codeOwnerConfigKey)) .isEqualTo(Paths.get(codeOwnerConfigKey.folderPath() + getFileName())); } @@ -484,7 +484,7 @@ public void getFilePathForCodeOwnerConfigKeyWithoutFileName() throws Exception { public void getFilePathForCodeOwnerConfigKeyWithFileName() throws Exception { CodeOwnerConfig.Key codeOwnerConfigKey = CodeOwnerConfig.Key.create(project, "master", "/", getFileName() + "_foo_bar"); - assertThat(codeOwnerBackend.getFilePath(codeOwnerConfigKey)) + Truth8.assertThat(codeOwnerBackend.getFilePath(codeOwnerConfigKey)) .isEqualTo( Paths.get(codeOwnerConfigKey.folderPath() + codeOwnerConfigKey.fileName().get())); } diff --git a/javatests/com/google/gerrit/plugins/codeowners/backend/CodeOwnerConfigReferenceTest.java b/javatests/com/google/gerrit/plugins/codeowners/backend/CodeOwnerConfigReferenceTest.java index 42d3696a1..332ec6b73 100644 --- a/javatests/com/google/gerrit/plugins/codeowners/backend/CodeOwnerConfigReferenceTest.java +++ b/javatests/com/google/gerrit/plugins/codeowners/backend/CodeOwnerConfigReferenceTest.java @@ -17,9 +17,9 @@ import static com.google.common.truth.PathSubject.paths; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertWithMessage; -import static com.google.common.truth.Truth8.assertThat; import static com.google.gerrit.testing.GerritJUnit.assertThrows; +import com.google.common.truth.Truth8; import com.google.gerrit.plugins.codeowners.acceptance.AbstractCodeOwnersTest; import java.nio.file.Path; import java.nio.file.Paths; @@ -66,7 +66,7 @@ public void absoluteFilePathCanBeSpecifiedInDifferentFormats() throws Exception public void relativeFilePathCanBeSpecified() throws Exception { Path path = CodeOwnerConfigReference.create(CodeOwnerConfigImportMode.ALL, "foo/OWNERS").filePath(); - assertThat(path).isEqualTo(Paths.get("foo/OWNERS")); + Truth8.assertThat(path).isEqualTo(Paths.get("foo/OWNERS")); assertThat(path.isAbsolute()).isFalse(); } } diff --git a/javatests/com/google/gerrit/plugins/codeowners/backend/CodeOwnerConfigTest.java b/javatests/com/google/gerrit/plugins/codeowners/backend/CodeOwnerConfigTest.java index 433922f20..09b40ca44 100644 --- a/javatests/com/google/gerrit/plugins/codeowners/backend/CodeOwnerConfigTest.java +++ b/javatests/com/google/gerrit/plugins/codeowners/backend/CodeOwnerConfigTest.java @@ -15,9 +15,9 @@ package com.google.gerrit.plugins.codeowners.backend; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import static com.google.gerrit.testing.GerritJUnit.assertThrows; +import com.google.common.truth.Truth8; import com.google.gerrit.entities.BranchNameKey; import com.google.gerrit.entities.Project; import com.google.gerrit.entities.RefNames; @@ -88,7 +88,8 @@ public void getFilePath() throws Exception { String folderPath = "/foo/bar/"; CodeOwnerConfig.Key codeOwnerConfigKey = CodeOwnerConfig.Key.create(Project.nameKey("project"), "master", folderPath); - assertThat(codeOwnerConfigKey.filePath("OWNERS")).isEqualTo(Paths.get(folderPath, "OWNERS")); + Truth8.assertThat(codeOwnerConfigKey.filePath("OWNERS")) + .isEqualTo(Paths.get(folderPath, "OWNERS")); } @Test @@ -98,7 +99,7 @@ public void getFilePathWithCustomFileName() throws Exception { CodeOwnerConfig.Key codeOwnerConfigKey = CodeOwnerConfig.Key.create( Project.nameKey("project"), "master", folderPath, customFileName); - assertThat(codeOwnerConfigKey.filePath("OWNERS")) + Truth8.assertThat(codeOwnerConfigKey.filePath("OWNERS")) .isEqualTo(Paths.get(folderPath, customFileName)); } @@ -141,7 +142,7 @@ public void relativizePath() throws Exception { TEST_REVISION) .build(); Path relativizedPath = codeOwnerConfig.relativize(Paths.get("/foo/bar/baz.md")); - assertThat(relativizedPath).isEqualTo(Paths.get("baz.md")); + Truth8.assertThat(relativizedPath).isEqualTo(Paths.get("baz.md")); } private static CodeOwnerConfig.Builder createCodeOwnerBuilder() { diff --git a/javatests/com/google/gerrit/plugins/codeowners/util/JgitPathTest.java b/javatests/com/google/gerrit/plugins/codeowners/util/JgitPathTest.java index 4b73459fe..1340aeaa3 100644 --- a/javatests/com/google/gerrit/plugins/codeowners/util/JgitPathTest.java +++ b/javatests/com/google/gerrit/plugins/codeowners/util/JgitPathTest.java @@ -15,9 +15,9 @@ package com.google.gerrit.plugins.codeowners.util; import static com.google.common.truth.Truth.assertThat; -import static com.google.common.truth.Truth8.assertThat; import static com.google.gerrit.testing.GerritJUnit.assertThrows; +import com.google.common.truth.Truth8; import com.google.gerrit.plugins.codeowners.acceptance.AbstractCodeOwnersTest; import java.nio.file.Path; import java.nio.file.Paths; @@ -53,7 +53,7 @@ public void cannotGetJgitPathOfNullPath() throws Exception { @Test public void getPathAsAbsolutePath() throws Exception { - assertThat(JgitPath.of("foo/bar/OWNERS").getAsAbsolutePath()) + Truth8.assertThat(JgitPath.of("foo/bar/OWNERS").getAsAbsolutePath()) .isEqualTo(Paths.get("/foo/bar/OWNERS")); }