Standardize test methods to be prefixed with "test"

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131176866
This commit is contained in:
mcilwain
2016-08-26 09:41:52 -04:00
committed by Ben McIlwain
parent 52bb8a5773
commit 8f0f701ff7
9 changed files with 43 additions and 46 deletions
@@ -49,7 +49,7 @@ public class LordnLogTest {
"1580e26-roid,3610");
@Test
public void successParseFirstLine() throws Exception {
public void testSuccess_parseFirstLine() throws Exception {
LordnLog log = LordnLog.parse(EXAMPLE_FROM_RFC);
assertThat(log.getStatus()).isEqualTo(LordnLog.Status.ACCEPTED);
assertThat(log.getLogCreation()).isEqualTo(DateTime.parse("2012-08-16T02:15:00.0Z"));
@@ -60,7 +60,7 @@ public class LordnLogTest {
}
@Test
public void successParseDnLines() throws Exception {
public void testSuccess_parseDnLines() throws Exception {
LordnLog log = LordnLog.parse(EXAMPLE_FROM_RFC);
Result result = log.getResult("SH8013-REP");
assertThat(result).isNotNull();
@@ -70,7 +70,7 @@ public class LordnLogTest {
}
@Test
public void successIterate() throws Exception {
public void testSuccess_iterate() throws Exception {
for (Entry<String, Result> result : LordnLog.parse(EXAMPLE_FROM_RFC)) {
assertThat(result.getKey()).isEqualTo("SH8013-REP");
assertThat(result.getValue().getCode()).isEqualTo(2000);
@@ -80,14 +80,14 @@ public class LordnLogTest {
}
@Test
public void successNoDnLines() throws Exception {
public void testSuccess_noDnLines() throws Exception {
LordnLog.parse(ImmutableList.of(
"1,2012-08-16T02:15:00.0Z,2012-08-16T00:00:00.0Z,lolcat,accepted,no-warnings,0",
"roid,result-code"));
}
@Test
public void failureNoDnLineMismatch() throws Exception {
public void testFailure_noDnLineMismatch() throws Exception {
thrown.expect(IllegalArgumentException.class);
LordnLog.parse(ImmutableList.of(
"1,2012-08-16T02:15:00.0Z,2012-08-16T00:00:00.0Z,lolcat,accepted,no-warnings,1",
@@ -95,26 +95,26 @@ public class LordnLogTest {
}
@Test
public void failureParseNull() throws Exception {
public void testFailure_parseNull() throws Exception {
thrown.expect(NullPointerException.class);
LordnLog.parse(null);
}
@Test
public void failureParseEmpty() throws Exception {
public void testFailure_parseEmpty() throws Exception {
thrown.expect(Exception.class);
LordnLog.parse(ImmutableList.<String>of());
}
@Test
public void failureParseMissingHeaderLine() throws Exception {
public void testFailure_parseMissingHeaderLine() throws Exception {
thrown.expect(Exception.class);
LordnLog.parse(ImmutableList.of(
"1,2012-08-16T02:15:00.0Z,2012-08-16T00:00:00.0Z,lolcat,accepted,no-warnings,0"));
}
@Test
public void successToString() throws Exception {
public void testSuccess_toString() throws Exception {
assertThat(LordnLog.parse(EXAMPLE_WITH_WARNINGS).toString()).isEqualTo(
"LordnLog{"
+ "logId=0000000000000004799, "
@@ -131,14 +131,14 @@ public class LordnLogTest {
}
@Test
public void successResultToString() throws Exception {
public void testSuccess_resultToString() throws Exception {
assertThat(
LordnLog.parse(EXAMPLE_FROM_RFC).iterator().next().toString())
.isEqualTo("SH8013-REP=Result{code=2000, outcome=OK, description=OK}");
}
@Test
public void successWithWarnings() throws Exception {
public void testSuccess_withWarnings() throws Exception {
LordnLog log = LordnLog.parse(EXAMPLE_WITH_WARNINGS);
assertThat(log.getStatus()).isEqualTo(LordnLog.Status.ACCEPTED);
assertThat(log.getLogCreation()).isEqualTo(DateTime.parse("2014-03-21T15:40:08.4Z"));