Revert "INT-3184: Test HTTP Matrix Variables"
This reverts commit b607b6d3c9.
This commit is contained in:
@@ -13,12 +13,6 @@
|
||||
http://www.springframework.org/schema/integration/http
|
||||
http://www.springframework.org/schema/integration/http/spring-integration-http.xsd">
|
||||
|
||||
<!-- Allow Matrix Variables -->
|
||||
<beans:bean id="integrationRequestMappingHandlerMapping"
|
||||
class="org.springframework.integration.http.inbound.IntegrationRequestMappingHandlerMapping">
|
||||
<beans:property name="removeSemicolonContent" value="false"/>
|
||||
</beans:bean>
|
||||
|
||||
<int-http:inbound-gateway path="/path1,/path2"
|
||||
request-channel="multiplePathsChannel"/>
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ package org.springframework.integration.http.inbound;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -28,7 +27,6 @@ import java.util.Map;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
|
||||
import org.hamcrest.Matchers;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -102,7 +100,9 @@ public class Int2312RequestMappingIntegrationTests extends AbstractHttpInboundTe
|
||||
public void testURIVariablesAndHeaders() throws Exception {
|
||||
MockHttpServletRequest request = new MockHttpServletRequest();
|
||||
request.setMethod("GET");
|
||||
String testRequest = "aBc;q1=1;q2=2";
|
||||
String testRequest = "aBc";
|
||||
// TODO test it after upgrade to Spring 4.0
|
||||
// String testRequest = "aBc;q1=1;q2=2";
|
||||
String requestURI = "/test/" + testRequest;
|
||||
request.setRequestURI(requestURI);
|
||||
request.setContentType("text/plain");
|
||||
@@ -129,12 +129,8 @@ public class Int2312RequestMappingIntegrationTests extends AbstractHttpInboundTe
|
||||
assertNotNull(requestParams);
|
||||
assertEquals(params, ((MultiValueMap<String, String>) requestParams).toSingleValueMap());
|
||||
|
||||
Object matrixVariables = headers.get("matrixVariables");
|
||||
assertThat(matrixVariables, Matchers.instanceOf(Map.class));
|
||||
Object value = ((Map) matrixVariables).get("value");
|
||||
assertThat(value, Matchers.instanceOf(MultiValueMap.class));
|
||||
assertEquals("1", ((MultiValueMap) value).getFirst("q1"));
|
||||
assertEquals("2", ((MultiValueMap) value).getFirst("q2"));
|
||||
// TODO test it after upgrade to Spring 4.0
|
||||
// assertEquals(matrixVariables, headers.get("matrixVariables"));
|
||||
|
||||
Object requestHeaders = headers.get("requestHeaders");
|
||||
assertNotNull(requestParams);
|
||||
@@ -153,7 +149,7 @@ public class Int2312RequestMappingIntegrationTests extends AbstractHttpInboundTe
|
||||
Object handler = this.handlerMapping.getHandler(request).getHandler();
|
||||
this.handlerAdapter.handle(request, response, handler);
|
||||
final String testResponse = response.getContentAsString();
|
||||
assertEquals(testRequest.split(";")[0].toLowerCase(), testResponse);
|
||||
assertEquals(testRequest.toLowerCase(), testResponse);
|
||||
|
||||
RequestContextHolder.resetRequestAttributes();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user