Remove formatter-on/off comments
This commit is contained in:
@@ -27,8 +27,6 @@ import org.springframework.graphql.test.tester.WebGraphQlTester;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
// @formatter:off
|
||||
|
||||
@SpringBootTest()
|
||||
@AutoConfigureWebTestClient
|
||||
@AutoConfigureGraphQlTester
|
||||
|
||||
@@ -32,12 +32,10 @@ public class SampleWiring implements RuntimeWiringBuilderCustomizer {
|
||||
|
||||
@Override
|
||||
public void customize(RuntimeWiring.Builder wiringBuilder) {
|
||||
// @formatter:off
|
||||
wiringBuilder.type("Query", builder -> builder.dataFetcher("greeting", this.repository::getBasic));
|
||||
wiringBuilder.type("Query", builder -> builder.dataFetcher("greetingMono", this.repository::getGreeting));
|
||||
wiringBuilder.type("Query", builder -> builder.dataFetcher("greetingsFlux", this.repository::getGreetings));
|
||||
wiringBuilder.type("Subscription", builder -> builder.dataFetcher("greetings", this.repository::getGreetingsStream));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,8 +25,6 @@ import org.springframework.graphql.test.tester.GraphQlTester;
|
||||
import org.springframework.graphql.test.tester.WebGraphQlTester;
|
||||
import org.springframework.graphql.web.WebGraphQlHandler;
|
||||
|
||||
// @formatter:off
|
||||
|
||||
/**
|
||||
* GraphQL query tests directly via {@link GraphQL}.
|
||||
*/
|
||||
|
||||
@@ -27,8 +27,6 @@ import org.springframework.graphql.test.tester.GraphQlTester;
|
||||
import org.springframework.graphql.test.tester.WebGraphQlTester;
|
||||
import org.springframework.graphql.web.WebGraphQlHandler;
|
||||
|
||||
// @formatter:off
|
||||
|
||||
/**
|
||||
* GraphQL subscription tests directly via {@link GraphQL}.
|
||||
*/
|
||||
|
||||
@@ -11,8 +11,6 @@ import org.springframework.graphql.test.tester.WebGraphQlTester;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
// @formatter:off
|
||||
|
||||
@SpringBootTest
|
||||
@AutoConfigureMockMvc
|
||||
@AutoConfigureGraphQlTester
|
||||
|
||||
@@ -10,12 +10,10 @@ public enum ProjectStatus {
|
||||
|
||||
@JsonCreator
|
||||
public static ProjectStatus fromName(String name) {
|
||||
// @formatter:off
|
||||
return Arrays.stream(ProjectStatus.values())
|
||||
.filter(type -> type.name().equals(name))
|
||||
.findFirst()
|
||||
.orElse(ProjectStatus.ACTIVE);
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,12 +10,10 @@ public enum ReleaseStatus {
|
||||
|
||||
@JsonCreator
|
||||
public static ReleaseStatus fromName(String name) {
|
||||
// @formatter:off
|
||||
return Arrays.stream(ReleaseStatus.values())
|
||||
.filter(type -> type.name().equals(name))
|
||||
.findFirst()
|
||||
.orElse(ReleaseStatus.GENERAL_AVAILABILITY);
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,13 +17,9 @@ import org.springframework.web.client.RestTemplate;
|
||||
@Component
|
||||
public class SpringProjectsClient {
|
||||
|
||||
// @formatter:off
|
||||
|
||||
private static final TypeReferences.CollectionModelType<Release> releaseCollection =
|
||||
new TypeReferences.CollectionModelType<Release>() {};
|
||||
|
||||
// @formatter:on
|
||||
|
||||
private final Traverson traverson;
|
||||
|
||||
public SpringProjectsClient(RestTemplateBuilder builder) {
|
||||
@@ -34,11 +30,9 @@ public class SpringProjectsClient {
|
||||
}
|
||||
|
||||
public Project fetchProject(String projectSlug) {
|
||||
// @formatter:off
|
||||
return this.traverson.follow("projects")
|
||||
.follow(Hop.rel("project").withParameter("id", projectSlug))
|
||||
.toObject(Project.class);
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
public List<Release> fetchProjectReleases(String projectSlug) {
|
||||
|
||||
@@ -18,12 +18,10 @@ public class ArtifactRepositoriesInitializer implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
// @formatter:off
|
||||
List<ArtifactRepository> repositoryList = Arrays.asList(
|
||||
new ArtifactRepository("spring-releases", "Spring Releases", "https://repo.spring.io/libs-releases"),
|
||||
new ArtifactRepository("spring-milestones", "Spring Milestones", "https://repo.spring.io/libs-milestones"),
|
||||
new ArtifactRepository("spring-snapshots", "Spring Snapshots", "https://repo.spring.io/libs-snapshots"));
|
||||
// @formatter:on
|
||||
repositories.saveAll(repositoryList);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@ import org.springframework.test.web.servlet.MockMvc;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
// @formatter:off
|
||||
|
||||
/**
|
||||
* GraphQL requests via {@link GraphQlTester} connecting to {@link MockMvc}.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user