Polish
This commit is contained in:
@@ -108,7 +108,7 @@ class MappingJackson2HttpMessageConverterTests {
|
||||
}
|
||||
|
||||
@Test // SPR-7905
|
||||
public void canReadAndWriteMicroformats() {
|
||||
void canReadAndWriteMicroformats() {
|
||||
assertThat(converter.canRead(MyBean.class, new MediaType("application", "vnd.test-micro-type+json"))).isTrue();
|
||||
assertThat(converter.canWrite(MyBean.class, new MediaType("application", "vnd.test-micro-type+json"))).isTrue();
|
||||
}
|
||||
@@ -151,7 +151,7 @@ class MappingJackson2HttpMessageConverterTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void readUntyped() throws IOException {
|
||||
void readUntyped() throws IOException {
|
||||
String body = "{" +
|
||||
"\"bytes\":\"AQI=\"," +
|
||||
"\"array\":[\"Foo\",\"Bar\"]," +
|
||||
@@ -247,7 +247,7 @@ class MappingJackson2HttpMessageConverterTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void readAndWriteGenerics() throws Exception {
|
||||
void readAndWriteGenerics() throws Exception {
|
||||
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter() {
|
||||
@Override
|
||||
protected JavaType getJavaType(Type type, @Nullable Class<?> contextClass) {
|
||||
@@ -286,7 +286,7 @@ class MappingJackson2HttpMessageConverterTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void readAndWriteParameterizedType() throws Exception {
|
||||
void readAndWriteParameterizedType() throws Exception {
|
||||
ParameterizedTypeReference<List<MyBean>> beansList = new ParameterizedTypeReference<>() {};
|
||||
|
||||
String body = "[{" +
|
||||
@@ -317,7 +317,7 @@ class MappingJackson2HttpMessageConverterTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void writeParameterizedBaseType() throws Exception {
|
||||
void writeParameterizedBaseType() throws Exception {
|
||||
ParameterizedTypeReference<List<MyBean>> beansList = new ParameterizedTypeReference<>() {};
|
||||
ParameterizedTypeReference<List<MyBase>> baseList = new ParameterizedTypeReference<>() {};
|
||||
|
||||
@@ -460,7 +460,7 @@ class MappingJackson2HttpMessageConverterTests {
|
||||
}
|
||||
|
||||
@Test // SPR-13318
|
||||
public void writeSubType() throws Exception {
|
||||
void writeSubType() throws Exception {
|
||||
MockHttpOutputMessage outputMessage = new MockHttpOutputMessage();
|
||||
MyBean bean = new MyBean();
|
||||
bean.setString("Foo");
|
||||
@@ -474,7 +474,7 @@ class MappingJackson2HttpMessageConverterTests {
|
||||
}
|
||||
|
||||
@Test // SPR-13318
|
||||
public void writeSubTypeList() throws Exception {
|
||||
void writeSubTypeList() throws Exception {
|
||||
MockHttpOutputMessage outputMessage = new MockHttpOutputMessage();
|
||||
List<MyBean> beans = new ArrayList<>();
|
||||
MyBean foo = new MyBean();
|
||||
@@ -498,7 +498,7 @@ class MappingJackson2HttpMessageConverterTests {
|
||||
}
|
||||
|
||||
@Test // gh-27511
|
||||
public void readWithNoDefaultConstructor() throws Exception {
|
||||
void readWithNoDefaultConstructor() throws Exception {
|
||||
String body = "{\"property1\":\"foo\",\"property2\":\"bar\"}";
|
||||
MockHttpInputMessage inputMessage = new MockHttpInputMessage(body.getBytes(StandardCharsets.UTF_8));
|
||||
inputMessage.getHeaders().setContentType(MediaType.APPLICATION_JSON);
|
||||
@@ -510,7 +510,7 @@ class MappingJackson2HttpMessageConverterTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void readNonUnicode() throws Exception {
|
||||
void readNonUnicode() throws Exception {
|
||||
String body = "{\"føø\":\"bår\"}";
|
||||
Charset charset = StandardCharsets.ISO_8859_1;
|
||||
MockHttpInputMessage inputMessage = new MockHttpInputMessage(body.getBytes(charset));
|
||||
@@ -522,7 +522,7 @@ class MappingJackson2HttpMessageConverterTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void readAscii() throws Exception {
|
||||
void readAscii() throws Exception {
|
||||
String body = "{\"foo\":\"bar\"}";
|
||||
Charset charset = StandardCharsets.US_ASCII;
|
||||
MockHttpInputMessage inputMessage = new MockHttpInputMessage(body.getBytes(charset));
|
||||
@@ -533,7 +533,7 @@ class MappingJackson2HttpMessageConverterTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void writeAscii() throws Exception {
|
||||
void writeAscii() throws Exception {
|
||||
MockHttpOutputMessage outputMessage = new MockHttpOutputMessage();
|
||||
Map<String,Object> body = new HashMap<>();
|
||||
body.put("foo", "bar");
|
||||
|
||||
@@ -193,7 +193,7 @@ class MappingJackson2XmlHttpMessageConverterTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void readNonUnicode() throws Exception {
|
||||
void readNonUnicode() throws Exception {
|
||||
String body = "<MyBean>" +
|
||||
"<string>føø bår</string>" +
|
||||
"</MyBean>";
|
||||
|
||||
@@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
class RequestAndSessionScopedBeanTests {
|
||||
|
||||
@Test
|
||||
public void testPutBeanInRequest() {
|
||||
void testPutBeanInRequest() {
|
||||
String targetBeanName = "target";
|
||||
|
||||
StaticWebApplicationContext wac = new StaticWebApplicationContext();
|
||||
@@ -70,7 +70,7 @@ class RequestAndSessionScopedBeanTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPutBeanInSession() {
|
||||
void testPutBeanInSession() {
|
||||
String targetBeanName = "target";
|
||||
HttpServletRequest request = new MockHttpServletRequest();
|
||||
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request));
|
||||
|
||||
@@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
class AnnotationConfigWebApplicationContextTests {
|
||||
|
||||
@Test
|
||||
public void registerSingleClass() {
|
||||
void registerSingleClass() {
|
||||
AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
|
||||
ctx.register(Config.class);
|
||||
ctx.refresh();
|
||||
@@ -43,7 +43,7 @@ class AnnotationConfigWebApplicationContextTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void configLocationWithSingleClass() {
|
||||
void configLocationWithSingleClass() {
|
||||
AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
|
||||
ctx.setConfigLocation(Config.class.getName());
|
||||
ctx.refresh();
|
||||
@@ -53,7 +53,7 @@ class AnnotationConfigWebApplicationContextTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void configLocationWithBasePackage() {
|
||||
void configLocationWithBasePackage() {
|
||||
AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
|
||||
ctx.setConfigLocation("org.springframework.web.context.support");
|
||||
ctx.refresh();
|
||||
@@ -63,7 +63,7 @@ class AnnotationConfigWebApplicationContextTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void withBeanNameGenerator() {
|
||||
void withBeanNameGenerator() {
|
||||
AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
|
||||
ctx.setBeanNameGenerator(new AnnotationBeanNameGenerator() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user