Merge branch '1.2.x'
This commit is contained in:
@@ -289,7 +289,7 @@ public class CurlRequestSnippetTests extends AbstractSnippetTests {
|
||||
this.operationBuilder.request("http://localhost/upload").method("POST")
|
||||
.header(HttpHeaders.CONTENT_TYPE,
|
||||
MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
.part("metadata", "{\"description\": \"foo\"}".getBytes()).build());
|
||||
.part("metadata", "{\"description\": \"foo\"}".getBytes()).build());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -303,9 +303,9 @@ public class CurlRequestSnippetTests extends AbstractSnippetTests {
|
||||
this.operationBuilder.request("http://localhost/upload").method("POST")
|
||||
.header(HttpHeaders.CONTENT_TYPE,
|
||||
MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
.part("image", new byte[0])
|
||||
.header(HttpHeaders.CONTENT_TYPE, MediaType.IMAGE_PNG_VALUE)
|
||||
.submittedFileName("documents/images/example.png").build());
|
||||
.part("image", new byte[0])
|
||||
.header(HttpHeaders.CONTENT_TYPE, MediaType.IMAGE_PNG_VALUE)
|
||||
.submittedFileName("documents/images/example.png").build());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -319,8 +319,8 @@ public class CurlRequestSnippetTests extends AbstractSnippetTests {
|
||||
this.operationBuilder.request("http://localhost/upload").method("POST")
|
||||
.header(HttpHeaders.CONTENT_TYPE,
|
||||
MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
.part("image", new byte[0])
|
||||
.submittedFileName("documents/images/example.png").build());
|
||||
.part("image", new byte[0])
|
||||
.submittedFileName("documents/images/example.png").build());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -335,9 +335,9 @@ public class CurlRequestSnippetTests extends AbstractSnippetTests {
|
||||
this.operationBuilder.request("http://localhost/upload").method("POST")
|
||||
.header(HttpHeaders.CONTENT_TYPE,
|
||||
MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
.part("image", new byte[0])
|
||||
.submittedFileName("documents/images/example.png").and()
|
||||
.param("a", "apple", "avocado").param("b", "banana").build());
|
||||
.part("image", new byte[0])
|
||||
.submittedFileName("documents/images/example.png").and()
|
||||
.param("a", "apple", "avocado").param("b", "banana").build());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -349,7 +349,7 @@ public class CurlRequestSnippetTests extends AbstractSnippetTests {
|
||||
.header(HttpHeaders.AUTHORIZATION,
|
||||
"Basic " + Base64Utils
|
||||
.encodeToString("user:secret".getBytes()))
|
||||
.build());
|
||||
.build());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -393,4 +393,5 @@ public class CurlRequestSnippetTests extends AbstractSnippetTests {
|
||||
.request("http://localhost/foo").param("a", "alpha").method("POST")
|
||||
.param("b", "bravo").content("Some content").build());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -47,7 +47,6 @@ import static org.springframework.restdocs.snippet.Attributes.key;
|
||||
* @author Paul-Christian Volkmer
|
||||
* @author Raman Gupta
|
||||
* @author Tomasz Kopczynski
|
||||
*
|
||||
*/
|
||||
@RunWith(Parameterized.class)
|
||||
public class HttpieRequestSnippetTests extends AbstractSnippetTests {
|
||||
@@ -288,7 +287,7 @@ public class HttpieRequestSnippetTests extends AbstractSnippetTests {
|
||||
this.operationBuilder.request("http://localhost/upload").method("POST")
|
||||
.header(HttpHeaders.CONTENT_TYPE,
|
||||
MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
.part("metadata", "{\"description\": \"foo\"}".getBytes()).build());
|
||||
.part("metadata", "{\"description\": \"foo\"}".getBytes()).build());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -302,9 +301,9 @@ public class HttpieRequestSnippetTests extends AbstractSnippetTests {
|
||||
this.operationBuilder.request("http://localhost/upload").method("POST")
|
||||
.header(HttpHeaders.CONTENT_TYPE,
|
||||
MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
.part("image", new byte[0])
|
||||
.header(HttpHeaders.CONTENT_TYPE, MediaType.IMAGE_PNG_VALUE)
|
||||
.submittedFileName("documents/images/example.png").build());
|
||||
.part("image", new byte[0])
|
||||
.header(HttpHeaders.CONTENT_TYPE, MediaType.IMAGE_PNG_VALUE)
|
||||
.submittedFileName("documents/images/example.png").build());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -317,8 +316,8 @@ public class HttpieRequestSnippetTests extends AbstractSnippetTests {
|
||||
this.operationBuilder.request("http://localhost/upload").method("POST")
|
||||
.header(HttpHeaders.CONTENT_TYPE,
|
||||
MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
.part("image", new byte[0])
|
||||
.submittedFileName("documents/images/example.png").build());
|
||||
.part("image", new byte[0])
|
||||
.submittedFileName("documents/images/example.png").build());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -332,9 +331,9 @@ public class HttpieRequestSnippetTests extends AbstractSnippetTests {
|
||||
this.operationBuilder.request("http://localhost/upload").method("POST")
|
||||
.header(HttpHeaders.CONTENT_TYPE,
|
||||
MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
.part("image", new byte[0])
|
||||
.submittedFileName("documents/images/example.png").and()
|
||||
.param("a", "apple", "avocado").param("b", "banana").build());
|
||||
.part("image", new byte[0])
|
||||
.submittedFileName("documents/images/example.png").and()
|
||||
.param("a", "apple", "avocado").param("b", "banana").build());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -346,7 +345,7 @@ public class HttpieRequestSnippetTests extends AbstractSnippetTests {
|
||||
.header(HttpHeaders.AUTHORIZATION,
|
||||
"Basic " + Base64Utils
|
||||
.encodeToString("user:secret".getBytes()))
|
||||
.build());
|
||||
.build());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2017 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.
|
||||
@@ -102,6 +102,7 @@ public class ValidatorConstraintResolverTests {
|
||||
|
||||
@CompositeConstraint
|
||||
private String composite;
|
||||
|
||||
}
|
||||
|
||||
@ConstraintComposition(CompositionType.OR)
|
||||
@@ -158,5 +159,7 @@ public class ValidatorConstraintResolverTests {
|
||||
description.appendText("Constraint named " + this.annotation.getName()
|
||||
+ " with configuration " + this.configuration);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2017 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.
|
||||
@@ -77,4 +77,5 @@ public class ContentTypeLinkExtractorTests {
|
||||
new ContentTypeLinkExtractor(extractors).extractLinks(response);
|
||||
verify(extractor).extractLinks(response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
* Copyright 2014-2017 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.
|
||||
@@ -121,4 +121,5 @@ public class LinkExtractorsPayloadTests {
|
||||
return new File("src/test/resources/link-payloads/" + this.linkType + "/" + name
|
||||
+ ".json");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
* Copyright 2014-2017 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.
|
||||
@@ -88,4 +88,5 @@ public class QueryStringParserTests {
|
||||
.expectMessage(equalTo("The parameter 'a=apple=avocado' is malformed"));
|
||||
this.queryStringParser.parse(URI.create("http://localhost?a=apple=avocado"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2017 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.
|
||||
@@ -57,4 +57,5 @@ public class DelegatingOperationResponsePreprocessorTests {
|
||||
|
||||
assertThat(result, is(preprocessedResponse3));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2017 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.
|
||||
@@ -155,4 +155,5 @@ public class LinkMaskingContentModifierTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
* Copyright 2014-2017 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.
|
||||
@@ -56,7 +56,7 @@ public class PrettyPrintingContentModifierTests {
|
||||
equalTo(String
|
||||
.format("<?xml version=\"1.0\" encoding=\"UTF-8\"?>%n"
|
||||
+ "<one a=\"alpha\">%n <two b=\"bravo\"/>%n</one>%n")
|
||||
.getBytes()));
|
||||
.getBytes()));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -85,4 +85,5 @@ public class PrettyPrintingContentModifierTests {
|
||||
objectMapper.writeValueAsBytes(input), null), Map.class);
|
||||
assertThat(output, is(equalTo(input)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -510,4 +510,5 @@ public class JsonFieldProcessorTests {
|
||||
entry.put(key, value);
|
||||
return entry;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user