Polishing

This commit is contained in:
Juergen Hoeller
2017-07-19 22:22:27 +02:00
parent 46eba3dbfa
commit ac1d3b22c9
10 changed files with 38 additions and 41 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 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.
@@ -32,10 +32,7 @@ import org.springframework.mock.web.test.MockFilterChain;
import org.springframework.mock.web.test.MockHttpServletRequest;
import org.springframework.mock.web.test.MockHttpServletResponse;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.*;
/**
* Unit tests for {@link ForwardedHeaderFilter}.
@@ -61,7 +58,7 @@ public class ForwardedHeaderFilterTests {
@Before
@SuppressWarnings("serial")
public void setUp() throws Exception {
public void setup() throws Exception {
this.request = new MockHttpServletRequest();
this.request.setScheme("http");
this.request.setServerName("localhost");

View File

@@ -32,11 +32,11 @@ import org.springframework.mock.web.test.MockFilterChain;
import org.springframework.mock.web.test.MockHttpServletRequest;
import org.springframework.mock.web.test.MockHttpServletResponse;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.*;
/**
* Unit tests for {@link RelativeRedirectFilter}.
*
* @author Rob Winch
*/
@RunWith(MockitoJUnitRunner.class)
@@ -110,4 +110,5 @@ public class RelativeRedirectFilterTests {
HttpServletResponse wrappedResponse = (HttpServletResponse) chain.getResponse();
wrappedResponse.sendRedirect(location);
}
}
}