-
Notifications
You must be signed in to change notification settings - Fork 245
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
kommuneingrid
wants to merge
145
commits into
42BV:master
Choose a base branch
from
ingridhorten:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
testerBot #1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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
Changes to Readme.
…ServletResponseStatusMatchers - fixed test codes to use response().status().is(HttpStatus) and response().status().isXyz() methods.
…onse().status().is(HttpStatus).
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
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.