Skip to content

testerBot #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 145 commits into
base: master
Choose a base branch
from
Open

testerBot #1

wants to merge 145 commits into from

Conversation

kommuneingrid
Copy link

@kommuneingrid kommuneingrid commented Aug 20, 2018

No description provided.

habuma and others added 30 commits June 24, 2011 13:48
…lt, add request package, minor refactorings in context-based setup.
- Add and improve JavaDoc throughout server-side code
- Shorten the class names of result matchers, result printers, and request builders
- Add use of HttpStatus (rather than int) and MediaType for verifying the content type of responses
- Use "MockMvc" as prefix in class names imported from tests - MockMvc, MockMvcBuilders, MockMvcRequestBuilders, MockMvcResultActions
- Consolidate all MockMvc builder classes in ~.server.setup package, review and polish
- Remove MvcResult and simpify the relation between MockMvc and MockDispatcher
…ServletResponseStatusMatchers

- fixed test codes to use response().status().is(HttpStatus) and response().status().isXyz() methods.
Response body matching is now in a separate class called
ContentResultMatchers, which further provides access to two more
such classes for JsonPath & XPath matchers.

Tests have been re-organized to consolidate tests for demo purposes
into a separate package called "samples". Xpath and JsonPath related
tests are now available there.

Unhandled exceptions are no longer caught but are left to bubble
all the way up to JUnit and be reported there as with any JUnit test.

AbstractContextMockMvcBuilder has been renamed to
ContextMockMvcBuilderSupport and some miscellaneous improvements
made to the StandaloneMockMvcBuilder.


Conflicts:
	src/main/java/org/springframework/test/web/server/result/ServletResponseMatchers.java
	src/test/java/org/springframework/test/web/server/samples/standalone/ExceptionHandlerTests.java
	src/test/java/org/springframework/test/web/server/samples/standalone/ResponseTests.java
	src/test/java/org/springframework/test/web/server/setup/ViewResolverStandaloneSetupTests.java
	src/test/java/org/springframework/test/web/server/setup/WebApplicationResourceAccessTests.java
…om/SpringSource/spring-test-mvc

- Moved the ServletResponseStatusMatchers to the StatusResultMatchers.
- Moved the ApplicationContextSetupTests to the TestContextTests
Support for HandlerMethodArgumentResolver
rstoyanchev and others added 30 commits September 13, 2012 23:03
The exists and doesNotExist checks in CookieResultMatchers now check
for existence only. Previously the cookie's maxAge was also included in
the check (maxAge=0, i.e. expired).
When no servlet path and no context path has been defined, set the
pathInfo to the full requestUri.
AbstractMockMvcBuilder now provides method for defining a default
request as well as default expectations that are then used fo every
performed request.
Before this change, the pathInfo was determined automatically. After
the change, the pathInfo can be specified, and if so the value is used
as-is, i.e. without validating that:

requestUri = contextPath + servletPath + pathInfo

The assumption is that if the test chooses to specify the pathInfo
explicitly, it is targetting a specific scenario. For example,
simulating a welcome file where for requestUri "/", the servletPath
is "/index.html"
This change changes the version of hamcrest we build with to match the
one packaged inside JUnit 4.10. It is also the version that the Spring
Framework is built against.
Currently MockMvcBuilders.webApplicationContextSetup returns
MockMvcBuilder rather than InitializedContextMockMvcBuilder. This is
problematic for anyone wanting to add a Filter which is defined on the
AbstractMockMvcBuilder.

This update changes MockMvcBuilders.webApplicationContextSetup to return
InitializedContextMockMvcBuilder which allows adding a Filter and is more
consistent with the other factory methods.MockMvcBuilders should return InitializedContextMockMvcBuilder
- ability to add flash attributes
- ability to create and use custom request-building methods
- rename DefaultRequestBuilder to MockHttpServletRequestBuilder
- rename MultipartRequestBuilder to MockHttpServletRequestBuilder
- javadoc
Introduce new MockMvcBuilderSupport base class that instantiates
MockMvc and the TestDispatcherServlet with AbstractMockMvcBuilder
sub-class actually implements the MockMvcBuilders interface.

Replace ResultHandler classes for printing debug information with
just one PrintingResultHandler base class.

Javadoc updates.
Demonstrates how to use a RequestPostProcessor to add request-building
methods for establishing a security context for Spring Security.
* rwinch-securityrequestpostprocessor:
  Add SecurityRequestPostProcessors to sample tests
Remove use of UriTemplate in MockMvcRequestBuilders.
Rely on UriComponentsBuilder instead.

Decode query params before setting them on MockHttpServletRequest.

Ignore white spaces and comments when comparing XML.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.