Add MockServerWebExchange and toExchange shortcuts

Issue: SPR-15350
This commit is contained in:
Rossen Stoyanchev
2017-03-16 11:52:30 -04:00
parent 45aa1edf87
commit 41c413a748
5 changed files with 162 additions and 13 deletions

View File

@@ -44,7 +44,6 @@ import org.springframework.util.MultiValueMap;
import org.springframework.util.StringUtils;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebSession;
import org.springframework.web.server.session.DefaultWebSessionManager;
import org.springframework.web.server.session.WebSessionManager;
/**
@@ -82,14 +81,6 @@ public class DefaultServerWebExchange implements ServerWebExchange {
private volatile boolean notModified;
/**
* Constructor with a request and response only.
* By default creates a session manager of type {@link DefaultWebSessionManager}.
*/
public DefaultServerWebExchange(ServerHttpRequest request, ServerHttpResponse response) {
this(request, response, new DefaultWebSessionManager());
}
/**
* Alternate constructor with a WebSessionManager parameter.
*/