Convert remaining acceptance tests to use Google Truth
Change-Id: Idb136f532fb78ae4bedfeadd4ff7aabd8414f9a2
This commit is contained in:
@@ -14,12 +14,12 @@
|
||||
|
||||
package com.google.gerrit.acceptance;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.gerrit.acceptance.GitUtil.cloneProject;
|
||||
import static com.google.gerrit.acceptance.GitUtil.createProject;
|
||||
import static com.google.gerrit.acceptance.GitUtil.initSsh;
|
||||
import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
|
||||
import static com.google.gerrit.server.project.Util.block;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.primitives.Chars;
|
||||
@@ -205,7 +205,7 @@ public abstract class AbstractDaemonTest {
|
||||
ListChangesOption... options) throws IOException {
|
||||
String q = options.length > 0 ? "?o=" + Joiner.on("&o=").join(options) : "";
|
||||
RestResponse r = session.get("/changes/" + changeId + q);
|
||||
assertEquals(HttpStatus.SC_OK, r.getStatusCode());
|
||||
assertThat(r.getStatusCode()).isEqualTo(HttpStatus.SC_OK);
|
||||
return newGson().fromJson(r.getReader(), ChangeInfo.class);
|
||||
}
|
||||
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
package com.google.gerrit.acceptance;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import com.google.gerrit.server.config.GerritServerConfig;
|
||||
import com.google.inject.Inject;
|
||||
@@ -31,7 +31,7 @@ public class UseGerritConfigAnnotationTest extends AbstractDaemonTest {
|
||||
@Test
|
||||
@GerritConfig(name="x.y", value="z")
|
||||
public void testOne() {
|
||||
assertEquals("z", serverConfig.getString("x", null, "y"));
|
||||
assertThat(serverConfig.getString("x", null, "y")).isEqualTo("z");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -40,7 +40,7 @@ public class UseGerritConfigAnnotationTest extends AbstractDaemonTest {
|
||||
@GerritConfig(name="a.b", value="c")
|
||||
})
|
||||
public void testMultiple() {
|
||||
assertEquals("z", serverConfig.getString("x", null, "y"));
|
||||
assertEquals("c", serverConfig.getString("a", null, "b"));
|
||||
assertThat(serverConfig.getString("x", null, "y")).isEqualTo("z");
|
||||
assertThat(serverConfig.getString("a", null, "b")).isEqualTo("c");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user