Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Apr 5, 2018
1 parent b13b3be commit f335ec0
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,9 +37,9 @@
import static io.restassured.RestAssured.given;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.CoreMatchers.is;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.modifyUris;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest;
import static org.springframework.restdocs.restassured3.RestAssuredRestDocumentation.document;
import static org.springframework.restdocs.restassured3.operation.preprocess.RestAssuredPreprocessors.modifyUris;

/**
* Integration tests for advanced configuration of {@link AutoConfigureRestDocs} with REST
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,9 +34,9 @@
import static io.restassured.RestAssured.given;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.CoreMatchers.is;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.modifyUris;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest;
import static org.springframework.restdocs.restassured3.RestAssuredRestDocumentation.document;
import static org.springframework.restdocs.restassured3.operation.preprocess.RestAssuredPreprocessors.modifyUris;

/**
* Integration tests for {@link RestDocsAutoConfiguration} with REST Assured.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ private void configureAdditionalMetadataLocations(Project project) {
private void configureAdditionalMetadataLocations(JavaCompile compile) {
compile.doFirst((task) -> {
if (hasConfigurationProcessorOnClasspath(compile)) {
findMatchingSourceSet(compile).ifPresent((sourceSet) -> {
configureAdditionalMetadataLocations(compile, sourceSet);
});
findMatchingSourceSet(compile).ifPresent(
(sourceSet) -> configureAdditionalMetadataLocations(compile,
sourceSet));
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ protected List<Archive> getClassPathArchives() throws Exception {

private List<Archive> getClassPathArchives(String path) throws Exception {
String root = cleanupPath(handleUrl(path));
List<Archive> lib = new ArrayList<Archive>();
List<Archive> lib = new ArrayList<>();
File file = new File(root);
if (!"/".equals(root)) {
if (!isAbsolutePath(root)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private boolean hasUnpackEntry(String entryName) {

private ZipEntry getEntryStartingWith(String entryName) {
return this.content.entrySet().stream()
.filter(entry -> entry.getKey().startsWith(entryName))
.filter((entry) -> entry.getKey().startsWith(entryName))
.map(Map.Entry::getValue).findFirst()
.orElseThrow(() -> new IllegalStateException(
"Unable to find entry starting with " + entryName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,8 @@ public void exceptionErrorWithCommittedResponse() throws Exception {

@Test
public void statusCode() throws Exception {
this.chain = new TestFilterChain((request, response, chain) -> {
assertThat(response.getStatus()).isEqualTo(200);
});
this.chain = new TestFilterChain((request, response,
chain) -> assertThat(response.getStatus()).isEqualTo(200));
this.filter.doFilter(this.request, this.response, this.chain);
assertThat(((HttpServletResponseWrapper) this.chain.getResponse()).getStatus())
.isEqualTo(200);
Expand Down

0 comments on commit f335ec0

Please sign in to comment.