Polishing

This commit is contained in:
Juergen Hoeller
2019-07-30 16:59:01 +02:00
parent 9a36027ae1
commit c4622dbebc
17 changed files with 40 additions and 52 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@@ -40,7 +40,7 @@ public class HandlerMethodArgumentResolverCompositeTests {
@Before
public void setUp() throws Exception {
public void setup() throws Exception {
this.resolverComposite = new HandlerMethodArgumentResolverComposite();
Method method = getClass().getDeclaredMethod("handle", Integer.class, String.class);
@@ -50,7 +50,7 @@ public class HandlerMethodArgumentResolverCompositeTests {
@Test
public void supportsParameter() {
public void supportsParameter() throws Exception {
this.resolverComposite.addResolver(new StubArgumentResolver(Integer.class));
assertTrue(this.resolverComposite.supportsParameter(paramInt));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@@ -30,6 +30,7 @@ import static org.mockito.Mockito.when;
/**
* Test fixture with {@link HandlerMethodReturnValueHandlerComposite}.
*
* @author Rossen Stoyanchev
*/
@SuppressWarnings("unused")
@@ -47,8 +48,7 @@ public class HandlerMethodReturnValueHandlerCompositeTests {
@Before
public void setUp() throws Exception {
public void setup() throws Exception {
this.integerType = new MethodParameter(getClass().getDeclaredMethod("handleInteger"), -1);
this.stringType = new MethodParameter(getClass().getDeclaredMethod("handleString"), -1);
@@ -61,6 +61,7 @@ public class HandlerMethodReturnValueHandlerCompositeTests {
mavContainer = new ModelAndViewContainer();
}
@Test
public void supportsReturnType() throws Exception {
assertTrue(this.handlers.supportsReturnType(this.integerType));
@@ -84,9 +85,8 @@ public class HandlerMethodReturnValueHandlerCompositeTests {
verifyNoMoreInteractions(anotherIntegerHandler);
}
@Test // SPR-13083
@Test // SPR-13083
public void handleReturnValueWithAsyncHandler() throws Exception {
Promise<Integer> promise = new Promise<>();
MethodParameter promiseType = new MethodParameter(getClass().getDeclaredMethod("handlePromise"), -1);