Remove test prefix from test methods
We previously used 'test' to prefix tests but have decided to stop this. This change removes the prefix from all test code. Change-Id: I229a36751adc6a87fbae8d6f373671e141529496
This commit is contained in:
@@ -75,7 +75,7 @@ public class ConfigUtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStoreLoadSection() throws Exception {
|
||||
public void storeLoadSection() throws Exception {
|
||||
SectionInfo d = SectionInfo.defaults();
|
||||
SectionInfo in = new SectionInfo();
|
||||
in.missing = "42";
|
||||
@@ -142,7 +142,7 @@ public class ConfigUtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTimeUnit() {
|
||||
public void timeUnit() {
|
||||
assertEquals(ms(0, MILLISECONDS), parse("0"));
|
||||
assertEquals(ms(2, MILLISECONDS), parse("2ms"));
|
||||
assertEquals(ms(200, MILLISECONDS), parse("200 milliseconds"));
|
||||
|
||||
@@ -25,14 +25,14 @@ public class GitwebConfigTest {
|
||||
private static final String SOME_INVALID_CHARACTERS = "09AZaz$-_.+!',";
|
||||
|
||||
@Test
|
||||
public void testValidPathSeparator() {
|
||||
public void validPathSeparator() {
|
||||
for (char c : VALID_CHARACTERS.toCharArray()) {
|
||||
assertTrue("valid character rejected: " + c, GitwebConfig.isValidPathSeparator(c));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInalidPathSeparator() {
|
||||
public void inalidPathSeparator() {
|
||||
for (char c : SOME_INVALID_CHARACTERS.toCharArray()) {
|
||||
assertFalse("invalid character accepted: " + c, GitwebConfig.isValidPathSeparator(c));
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ListCapabilitiesTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testList() throws Exception {
|
||||
public void list() throws Exception {
|
||||
Map<String, CapabilityInfo> m =
|
||||
injector.getInstance(ListCapabilities.class)
|
||||
.apply(new ConfigResource());
|
||||
|
||||
@@ -40,13 +40,13 @@ public class RepositoryConfigTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultSubmitTypeWhenNotConfigured() {
|
||||
public void defaultSubmitTypeWhenNotConfigured() {
|
||||
assertThat(repoCfg.getDefaultSubmitType(new NameKey("someProject")))
|
||||
.isEqualTo(SubmitType.MERGE_IF_NECESSARY);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultSubmitTypeForStarFilter() {
|
||||
public void defaultSubmitTypeForStarFilter() {
|
||||
configureDefaultSubmitType("*", SubmitType.CHERRY_PICK);
|
||||
assertThat(repoCfg.getDefaultSubmitType(new NameKey("someProject")))
|
||||
.isEqualTo(SubmitType.CHERRY_PICK);
|
||||
@@ -65,7 +65,7 @@ public class RepositoryConfigTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultSubmitTypeForSpecificFilter() {
|
||||
public void defaultSubmitTypeForSpecificFilter() {
|
||||
configureDefaultSubmitType("someProject", SubmitType.CHERRY_PICK);
|
||||
assertThat(repoCfg.getDefaultSubmitType(new NameKey("someOtherProject")))
|
||||
.isEqualTo(SubmitType.MERGE_IF_NECESSARY);
|
||||
@@ -74,7 +74,7 @@ public class RepositoryConfigTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultSubmitTypeForStartWithFilter() {
|
||||
public void defaultSubmitTypeForStartWithFilter() {
|
||||
configureDefaultSubmitType("somePath/somePath/*",
|
||||
SubmitType.REBASE_IF_NECESSARY);
|
||||
configureDefaultSubmitType("somePath/*", SubmitType.CHERRY_PICK);
|
||||
@@ -100,12 +100,12 @@ public class RepositoryConfigTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOwnerGroupsWhenNotConfigured() {
|
||||
public void ownerGroupsWhenNotConfigured() {
|
||||
assertThat(repoCfg.getOwnerGroups(new NameKey("someProject"))).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOwnerGroupsForStarFilter() {
|
||||
public void ownerGroupsForStarFilter() {
|
||||
ImmutableList<String> ownerGroups = ImmutableList.of("group1", "group2");
|
||||
configureOwnerGroups("*", ownerGroups);
|
||||
assertThat(repoCfg.getOwnerGroups(new NameKey("someProject")))
|
||||
@@ -113,7 +113,7 @@ public class RepositoryConfigTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOwnerGroupsForSpecificFilter() {
|
||||
public void ownerGroupsForSpecificFilter() {
|
||||
ImmutableList<String> ownerGroups = ImmutableList.of("group1", "group2");
|
||||
configureOwnerGroups("someProject", ownerGroups);
|
||||
assertThat(repoCfg.getOwnerGroups(new NameKey("someOtherProject")))
|
||||
@@ -123,7 +123,7 @@ public class RepositoryConfigTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOwnerGroupsForStartWithFilter() {
|
||||
public void ownerGroupsForStartWithFilter() {
|
||||
ImmutableList<String> ownerGroups1 = ImmutableList.of("group1");
|
||||
ImmutableList<String> ownerGroups2 = ImmutableList.of("group2");
|
||||
ImmutableList<String> ownerGroups3 = ImmutableList.of("group3");
|
||||
@@ -150,12 +150,12 @@ public class RepositoryConfigTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBasePathWhenNotConfigured() {
|
||||
public void basePathWhenNotConfigured() {
|
||||
assertThat((Object)repoCfg.getBasePath(new NameKey("someProject"))).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBasePathForStarFilter() {
|
||||
public void basePathForStarFilter() {
|
||||
String basePath = "/someAbsolutePath/someDirectory";
|
||||
configureBasePath("*", basePath);
|
||||
assertThat(repoCfg.getBasePath(new NameKey("someProject")).toString())
|
||||
@@ -163,7 +163,7 @@ public class RepositoryConfigTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBasePathForSpecificFilter() {
|
||||
public void basePathForSpecificFilter() {
|
||||
String basePath = "/someAbsolutePath/someDirectory";
|
||||
configureBasePath("someProject", basePath);
|
||||
assertThat((Object) repoCfg.getBasePath(new NameKey("someOtherProject")))
|
||||
@@ -173,7 +173,7 @@ public class RepositoryConfigTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBasePathForStartWithFilter() {
|
||||
public void basePathForStartWithFilter() {
|
||||
String basePath1 = "/someAbsolutePath1/someDirectory";
|
||||
String basePath2 = "someRelativeDirectory2";
|
||||
String basePath3 = "/someAbsolutePath3/someDirectory";
|
||||
@@ -196,7 +196,7 @@ public class RepositoryConfigTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllBasePath() {
|
||||
public void allBasePath() {
|
||||
ImmutableList<Path> allBasePaths = ImmutableList.of(
|
||||
Paths.get("/someBasePath1"),
|
||||
Paths.get("/someBasePath2"),
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ScheduleConfigTest {
|
||||
private static final DateTime NOW = DateTime.parse("2014-06-13T10:00:00-00:00");
|
||||
|
||||
@Test
|
||||
public void testInitialDelay() throws Exception {
|
||||
public void initialDelay() throws Exception {
|
||||
assertEquals(ms(1, HOURS), initialDelay("11:00", "1h"));
|
||||
assertEquals(ms(30, MINUTES), initialDelay("05:30", "1h"));
|
||||
assertEquals(ms(30, MINUTES), initialDelay("09:30", "1h"));
|
||||
@@ -56,7 +56,7 @@ public class ScheduleConfigTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCustomKeys() {
|
||||
public void customKeys() {
|
||||
Config rc = new Config();
|
||||
rc.setString("a", "b", "i", "1h");
|
||||
rc.setString("a", "b", "s", "01:00");
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.nio.file.Paths;
|
||||
|
||||
public class SitePathsTest extends GerritBaseTests {
|
||||
@Test
|
||||
public void testCreate_NotExisting() throws IOException {
|
||||
public void create_NotExisting() throws IOException {
|
||||
final Path root = random();
|
||||
final SitePaths site = new SitePaths(root);
|
||||
assertTrue(site.isNew);
|
||||
@@ -42,7 +42,7 @@ public class SitePathsTest extends GerritBaseTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreate_Empty() throws IOException {
|
||||
public void create_Empty() throws IOException {
|
||||
final Path root = random();
|
||||
try {
|
||||
Files.createDirectory(root);
|
||||
@@ -56,7 +56,7 @@ public class SitePathsTest extends GerritBaseTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreate_NonEmpty() throws IOException {
|
||||
public void create_NonEmpty() throws IOException {
|
||||
final Path root = random();
|
||||
final Path txt = root.resolve("test.txt");
|
||||
try {
|
||||
@@ -73,7 +73,7 @@ public class SitePathsTest extends GerritBaseTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreate_NotDirectory() throws IOException {
|
||||
public void create_NotDirectory() throws IOException {
|
||||
final Path root = random();
|
||||
try {
|
||||
Files.createFile(root);
|
||||
@@ -85,7 +85,7 @@ public class SitePathsTest extends GerritBaseTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testResolve() throws IOException {
|
||||
public void resolve() throws IOException {
|
||||
final Path root = random();
|
||||
final SitePaths site = new SitePaths(root);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user