Add JUnit 5 checkstyle rules
Add a rule to enforce JUnit 5 usage and conventions. Closes gh-17093
This commit is contained in:
@@ -27,12 +27,12 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Brian Clozel
|
||||
*/
|
||||
public class CompoundConfigurationTableEntryTests {
|
||||
class CompoundConfigurationTableEntryTests {
|
||||
|
||||
private static String NEWLINE = System.lineSeparator();
|
||||
|
||||
@Test
|
||||
public void simpleProperty() {
|
||||
void simpleProperty() {
|
||||
ConfigurationMetadataProperty firstProp = new ConfigurationMetadataProperty();
|
||||
firstProp.setId("spring.test.first");
|
||||
firstProp.setType("java.lang.String");
|
||||
|
||||
@@ -27,12 +27,12 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Brian Clozel
|
||||
*/
|
||||
public class ConfigurationTableTests {
|
||||
class ConfigurationTableTests {
|
||||
|
||||
private static String NEWLINE = System.lineSeparator();
|
||||
|
||||
@Test
|
||||
public void simpleTable() {
|
||||
void simpleTable() {
|
||||
ConfigurationTable table = new ConfigurationTable("test");
|
||||
ConfigurationMetadataProperty first = new ConfigurationMetadataProperty();
|
||||
first.setId("spring.test.prop");
|
||||
|
||||
@@ -27,12 +27,12 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Brian Clozel
|
||||
*/
|
||||
public class SingleConfigurationTableEntryTests {
|
||||
class SingleConfigurationTableEntryTests {
|
||||
|
||||
private static String NEWLINE = System.lineSeparator();
|
||||
|
||||
@Test
|
||||
public void simpleProperty() {
|
||||
void simpleProperty() {
|
||||
ConfigurationMetadataProperty property = new ConfigurationMetadataProperty();
|
||||
property.setId("spring.test.prop");
|
||||
property.setDefaultValue("something");
|
||||
@@ -46,7 +46,7 @@ public class SingleConfigurationTableEntryTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void noDefaultValue() {
|
||||
void noDefaultValue() {
|
||||
ConfigurationMetadataProperty property = new ConfigurationMetadataProperty();
|
||||
property.setId("spring.test.prop");
|
||||
property.setDescription("This is a description.");
|
||||
@@ -59,7 +59,7 @@ public class SingleConfigurationTableEntryTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void defaultValueWithPipes() {
|
||||
void defaultValueWithPipes() {
|
||||
ConfigurationMetadataProperty property = new ConfigurationMetadataProperty();
|
||||
property.setId("spring.test.prop");
|
||||
property.setDefaultValue("first|second");
|
||||
@@ -73,7 +73,7 @@ public class SingleConfigurationTableEntryTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void defaultValueWithBackslash() {
|
||||
void defaultValueWithBackslash() {
|
||||
ConfigurationMetadataProperty property = new ConfigurationMetadataProperty();
|
||||
property.setId("spring.test.prop");
|
||||
property.setDefaultValue("first\\second");
|
||||
@@ -87,7 +87,7 @@ public class SingleConfigurationTableEntryTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mapProperty() {
|
||||
void mapProperty() {
|
||||
ConfigurationMetadataProperty property = new ConfigurationMetadataProperty();
|
||||
property.setId("spring.test.prop");
|
||||
property.setDescription("This is a description.");
|
||||
@@ -100,7 +100,7 @@ public class SingleConfigurationTableEntryTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void listProperty() {
|
||||
void listProperty() {
|
||||
String[] defaultValue = new String[] { "first", "second", "third" };
|
||||
ConfigurationMetadataProperty property = new ConfigurationMetadataProperty();
|
||||
property.setId("spring.test.prop");
|
||||
|
||||
Reference in New Issue
Block a user