Fix MockMvc + HttpPutFormContentFilter issue

Issue: SPR-15753
This commit is contained in:
Rossen Stoyanchev
2017-07-11 11:43:48 +02:00
parent f6e9c47432
commit eb84547894
3 changed files with 97 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-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.
@@ -136,6 +136,7 @@ public class HttpPutFormContentFilterTests {
@Test
public void getParameterValues() throws Exception {
request.setQueryString("name=value1&name=value2");
request.addParameter("name", "value1");
request.addParameter("name", "value2");
request.setContent("name=value3&name=value4".getBytes("ISO-8859-1"));
@@ -149,6 +150,7 @@ public class HttpPutFormContentFilterTests {
@Test
public void getParameterValuesFromQueryString() throws Exception {
request.setQueryString("name=value1&name=value2");
request.addParameter("name", "value1");
request.addParameter("name", "value2");
request.setContent("anotherName=anotherValue".getBytes("ISO-8859-1"));
@@ -188,6 +190,7 @@ public class HttpPutFormContentFilterTests {
@Test
public void getParameterMap() throws Exception {
request.setQueryString("name=value1&name=value2");
request.addParameter("name", "value1");
request.addParameter("name", "value2");
request.setContent("name=value3&name4=value4".getBytes("ISO-8859-1"));