ProjectConfigParamParserTest: Convert to use Google Truth
Change-Id: I9964477709fb11c9eb1016a8ceab3c35e50b7dd9
This commit is contained in:
@@ -51,8 +51,7 @@ java_test(
|
||||
':sshd',
|
||||
'//gerrit-extension-api:api',
|
||||
'//gerrit-server:server',
|
||||
'//lib:guava',
|
||||
'//lib:junit',
|
||||
'//lib:truth',
|
||||
'//lib/mina:sshd',
|
||||
],
|
||||
source_under_test = [':sshd'],
|
||||
|
@@ -14,9 +14,7 @@
|
||||
|
||||
package com.google.gerrit.sshd.commands;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import com.google.gerrit.extensions.api.projects.ProjectInput.ConfigValue;
|
||||
|
||||
@@ -40,8 +38,8 @@ public class ProjectConfigParamParserTest {
|
||||
Map<String, Map<String, ConfigValue>> r =
|
||||
cmd.parsePluginConfigValues(Collections.singletonList(in));
|
||||
ConfigValue configValue = r.get("a").get("b");
|
||||
assertEquals("c", configValue.value);
|
||||
assertNull(configValue.values);
|
||||
assertThat(configValue.value).isEqualTo("c");
|
||||
assertThat(configValue.values).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -50,7 +48,7 @@ public class ProjectConfigParamParserTest {
|
||||
Map<String, Map<String, ConfigValue>> r =
|
||||
cmd.parsePluginConfigValues(Collections.singletonList(in));
|
||||
ConfigValue configValue = r.get("a").get("b");
|
||||
assertArrayEquals(new String[] {"c", "d", "e"}, configValue.values.toArray());
|
||||
assertNull(configValue.value);
|
||||
assertThat(configValue.values).containsExactly("c", "d", "e").inOrder();
|
||||
assertThat(configValue.value).isNull();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user