Browse Source

Give meaningful names to SprXxxTests in spring-test

pull/496/head
Rossen Stoyanchev 11 years ago
parent
commit
05213c684c
  1. 8
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/EncodedUriTests.java
  2. 5
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/HttpOptionsTests.java
  3. 22
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/MockMvcBuilderMethodChainTests.java
  4. 7
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/RequestContextHolderTests.java

8
spring-test/src/test/java/org/springframework/test/web/servlet/Spr11441Tests.java → spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/EncodedUriTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.test.web.servlet;
package org.springframework.test.web.servlet.samples.spr;
import org.junit.Before;
@ -31,6 +31,8 @@ import org.springframework.stereotype.Controller; @@ -31,6 +31,8 @@ import org.springframework.stereotype.Controller;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.ResultActions;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@ -51,14 +53,14 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @@ -51,14 +53,14 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppContextSetup;
/**
* Tests for SPR-11441 (MockMvc needs to accept prepared URI with encoded URI path variables).
* Tests for SPR-11441 (MockMvc accepts an already encoded URI).
*
* @author Sebastien Deleuze
*/
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration
public class Spr11441Tests {
public class EncodedUriTests {
@Autowired
private WebApplicationContext wac;

5
spring-test/src/test/java/org/springframework/test/web/servlet/Spr10093Tests.java → spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/HttpOptionsTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.test.web.servlet;
package org.springframework.test.web.servlet.samples.spr;
import java.util.concurrent.atomic.AtomicInteger;
@ -29,6 +29,7 @@ import org.springframework.stereotype.Controller; @@ -29,6 +29,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@ -49,7 +50,7 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.*; @@ -49,7 +50,7 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.*;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration
public class Spr10093Tests {
public class HttpOptionsTests {
@Autowired
private WebApplicationContext wac;

22
spring-test/src/test/java/org/springframework/test/web/servlet/setup/Spr10277Tests.java → spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/MockMvcBuilderMethodChainTests.java

@ -1,4 +1,19 @@ @@ -1,4 +1,19 @@
package org.springframework.test.web.servlet.setup;
/*
* Copyright 2002-2014 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.servlet.samples.spr;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
@ -9,20 +24,21 @@ import org.springframework.context.annotation.Configuration; @@ -9,20 +24,21 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
* Test for SPR-10277 (Multiple method chaining when building MockMvc).
* Test for SPR-10277 (multiple method chaining when building MockMvc).
*
* @author Wesley Hall
*/
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration
public class Spr10277Tests {
public class MockMvcBuilderMethodChainTests {
@Autowired
private WebApplicationContext wac;

7
spring-test/src/test/java/org/springframework/test/web/servlet/Spr10025Tests.java → spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/RequestContextHolderTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.test.web.servlet;
package org.springframework.test.web.servlet.samples.spr;
import org.junit.Before;
import org.junit.Test;
@ -28,6 +28,7 @@ import org.springframework.stereotype.Controller; @@ -28,6 +28,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.WebApplicationContext;
@ -42,14 +43,14 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @@ -42,14 +43,14 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.*;
/**
* Test for SPR-10025.
* Test for SPR-10025 (access to request attributes via RequestContextHolder).
*
* @author Rossen Stoyanchev
*/
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration
public class Spr10025Tests {
public class RequestContextHolderTests {
@Autowired
private WebApplicationContext wac;
Loading…
Cancel
Save