[java] Update tests for MethodNamingConventions

This commit is contained in:
Cyril
2021-08-06 14:56:19 +02:00
committed by GitHub
parent f76c5eec1a
commit 8acb7dc781

View File

@ -212,9 +212,11 @@ public class TournamentTest {
<expected-messages>
<message>The JUnit 5 test method name 'testGetBestTeam' doesn't match '[a-z][A-Za-z]*Test'</message>
<message>The JUnit 5 test method name 'getBestTeam' doesn't match '[a-z][A-Za-z]*Test'</message>
<message>The JUnit 5 test method name 'getWorstTeam' doesn't match '[a-z][A-Za-z]*Test'</message>
</expected-messages>
<code><![CDATA[
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
public class TournamentTest {
@Test // note that this is also a junit 3 test, but the junit 5 rule applies
@ -225,6 +227,10 @@ public class TournamentTest {
public void getBestTeam() {
}
@ParameterizedTest // this is a paramterized junit 5 test
public void getWorstTeam(String param) {
}
// this is ok
@Test
public void getBestTeamTest() {