mirror of
https://gitee.com/dcren/initializr.git
synced 2025-12-17 09:35:53 +08:00
Adopt Spring Java Format's JUnit 5 check
Closes gh-941
This commit is contained in:
@@ -77,7 +77,7 @@ public abstract class AbstractInitializrIntegrationTests {
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
@BeforeEach
|
||||
public void before(@TempDir Path folder) {
|
||||
void before(@TempDir Path folder) {
|
||||
this.restTemplate = this.restTemplateBuilder.build();
|
||||
this.folder = folder;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ class MainControllerIntegrationTests extends AbstractInitializrControllerIntegra
|
||||
|
||||
@Test
|
||||
@Disabled("Need a comparator that does not care about the number of elements in an array")
|
||||
public void currentMetadataCompatibleWithV2() {
|
||||
void currentMetadataCompatibleWithV2() {
|
||||
ResponseEntity<String> response = invokeHome(null, "*/*");
|
||||
validateMetadata(response, AbstractInitializrIntegrationTests.CURRENT_METADATA_MEDIA_TYPE, "2.0.0",
|
||||
JSONCompareMode.LENIENT);
|
||||
@@ -237,7 +237,7 @@ class MainControllerIntegrationTests extends AbstractInitializrControllerIntegra
|
||||
|
||||
@Test
|
||||
// make sure curl can still receive metadata with json
|
||||
public void curlWithAcceptHeaderJson() {
|
||||
void curlWithAcceptHeaderJson() {
|
||||
ResponseEntity<String> response = invokeHome("curl/1.2.4", "application/json");
|
||||
validateContentType(response, AbstractInitializrIntegrationTests.CURRENT_METADATA_MEDIA_TYPE);
|
||||
validateCurrentMetadata(response.getBody());
|
||||
@@ -263,7 +263,7 @@ class MainControllerIntegrationTests extends AbstractInitializrControllerIntegra
|
||||
|
||||
@Test
|
||||
// make sure curl can still receive metadata with json
|
||||
public void httpieWithAcceptHeaderJson() {
|
||||
void httpieWithAcceptHeaderJson() {
|
||||
ResponseEntity<String> response = invokeHome("HTTPie/0.8.0", "application/json");
|
||||
validateContentType(response, AbstractInitializrIntegrationTests.CURRENT_METADATA_MEDIA_TYPE);
|
||||
validateCurrentMetadata(response.getBody());
|
||||
@@ -296,7 +296,7 @@ class MainControllerIntegrationTests extends AbstractInitializrControllerIntegra
|
||||
|
||||
@Test
|
||||
// Test that the current output is exactly what we expect
|
||||
public void validateCurrentProjectMetadata() {
|
||||
void validateCurrentProjectMetadata() {
|
||||
validateCurrentMetadata(getMetadataJson());
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class CommandLineHelpGeneratorTests {
|
||||
private CommandLineHelpGenerator generator;
|
||||
|
||||
@BeforeEach
|
||||
public void init() {
|
||||
void init() {
|
||||
this.generator = new CommandLineHelpGenerator(new MustacheTemplateRenderer("classpath:/templates"));
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class DefaultInitializrMetadataUpdateStrategyTests {
|
||||
private MockRestServiceServer mockServer;
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
void setUp() {
|
||||
this.restTemplate = new RestTemplate();
|
||||
this.mockServer = MockRestServiceServer.createServer(this.restTemplate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user