Commits on Sep 25, 2012
  1. @spring-buildmaster
Commits on Sep 24, 2012
  1. @rstoyanchev
  2. @rstoyanchev

    Merge pull request #70 from rwinch/securityrequestpostprocessor

    * rwinch-securityrequestpostprocessor:
      Add SecurityRequestPostProcessors to sample tests
    rstoyanchev committed Sep 24, 2012
  3. @rwinch @rstoyanchev

    Add SecurityRequestPostProcessors to sample tests

    Demonstrates how to use a RequestPostProcessor to add request-building
    methods for establishing a security context for Spring Security.
    rwinch committed with rstoyanchev Sep 24, 2012
Commits on Sep 22, 2012
  1. @rstoyanchev

    Update Javadoc

    rstoyanchev committed Sep 22, 2012
  2. @rstoyanchev

    Polish server-side support

    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.
    rstoyanchev committed Sep 22, 2012
  3. @rstoyanchev

    Polish Javadoc

    rstoyanchev committed Sep 21, 2012
  4. @rstoyanchev
Commits on Sep 21, 2012
  1. @rstoyanchev

    Polish RequestBuilders

    - ability to add flash attributes
    - ability to create and use custom request-building methods
    - rename DefaultRequestBuilder to MockHttpServletRequestBuilder
    - rename MultipartRequestBuilder to MockHttpServletRequestBuilder
    - javadoc
    rstoyanchev committed Sep 21, 2012
Commits on Sep 20, 2012
  1. @rstoyanchev

    Polish Spring Security tests

    rstoyanchev committed Sep 20, 2012
  2. @rwinch @rstoyanchev

    Added Spring Security Sample

    rwinch committed with rstoyanchev Sep 14, 2012
  3. @rwinch @rstoyanchev

    MockMvcBuilders return concrete implementation

    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
    rwinch committed with rstoyanchev Sep 14, 2012
  4. @rstoyanchev

    Replace hamcrest-library 1.2.1 with hamcrest-all 1.1

    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.
    rstoyanchev committed Sep 20, 2012
  5. @rstoyanchev
  6. @rstoyanchev

    Refine pathInfo algorithm

    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"
    rstoyanchev committed Sep 19, 2012
Commits on Sep 19, 2012
  1. @rstoyanchev

    Add ability to define default request properties

    AbstractMockMvcBuilder now provides method for defining a default
    request as well as default expectations that are then used fo every
    performed request.
    rstoyanchev committed Sep 15, 2012
Commits on Sep 15, 2012
  1. @rstoyanchev

    Fix bug in setting pathInfo

    When no servlet path and no context path has been defined, set the
    pathInfo to the full requestUri.
    rstoyanchev committed Sep 15, 2012
  2. @rstoyanchev
Commits on Sep 14, 2012
  1. @rstoyanchev
  2. @rstoyanchev

    Adjust cookie existence checks

    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).
    rstoyanchev committed Sep 13, 2012
  3. @rstoyanchev

    Update DefaultRequestBuilder

    The URI scheme, host, and port are now correctly extracted from the URI
    template and set on the MockHttpServlet request.
    
    Various fixed to the algorithm for contextPath, servletPath, and
    PathInfo matching to the Servlet spec. Add more assertions and tests.
    
    The method cookie(Cookie... cookies) now adds rather than sets cookies.
    rstoyanchev committed Sep 13, 2012
Commits on Sep 13, 2012
  1. @rstoyanchev
  2. @rstoyanchev

    Rename methods called type to mimeType

    Method in result and request matchers named type() are now called
    mimeType() to prevent a clash with the "type" keyword word in Scala.
    rstoyanchev committed Sep 13, 2012
  3. @rstoyanchev
  4. @rstoyanchev

    Merge pull request from rwinch/filters

    * filters:
      Add support for using Servlet Filter's
    rstoyanchev committed Sep 13, 2012
  5. @rwinch @rstoyanchev

    Add support for using Servlet Filter's

    This change makes it possible to add Servlet Filter's to the processing
    chain in server-side Spring MVC testing.
    rwinch committed with rstoyanchev Aug 31, 2012
Commits on Sep 12, 2012
  1. @rstoyanchev

    Add mock client HTTP request implementations

    The new implementations are similar to MockHttpServletRequest/Response
    but are for the client and server-side HTTP abstractions in the
    org.springframework.http package. Currently implemented are
    MockHttpInputMessage, MockHttpOutputMessage, MockClientHttpRequest,
    and MockClientHttpResponse. The client-side Spring MVC Test support has
    been refactored to use the new abstractions
    rstoyanchev committed Sep 12, 2012
  2. @rstoyanchev

    Update client-side REST test support

    This change introduces new ways to define expectations on the body of
    the request including options for using XPath and JSONPath expressions,
    match XML content with XMLUnit, and expanded use of Hamcrest matchers.
    Similar options already exist for the server side.
    
    Further updates include sample tests, improved unit test coverage,
    comrehensive javadoc, and general polish.
    rstoyanchev committed Sep 8, 2012
Commits on Sep 5, 2012
  1. @cbeams
Commits on Aug 23, 2012
  1. Made DefaultResponseCreator to be public, as its builder methods retu…

    …rn itself and package-private was keeping the builder methods from being visible/usable in test classes.
    Craig Walls committed Aug 23, 2012
  2. Fixed ResponseCreators.withResponse(Resource, HttpHeaders, HttpStatus…

    …, String) to actually use the given HttpStatus instead of a hard-coded HttpStatus.OK.
    Craig Walls committed Aug 23, 2012
Commits on Jul 25, 2012
  1. @rstoyanchev
Commits on Jul 17, 2012
  1. @rstoyanchev

    Merge pull request #53 from svenfila/master

    * svenfila-master:
      Add session-related methods to DefaultRequestBuilder
    rstoyanchev committed Jul 17, 2012
  2. @svenfila @rstoyanchev

    Add session-related methods to DefaultRequestBuilder

    This change adds the methods session(MockHttpSession) and
    sessionAttrs(Map) for adding attributes or re-using a session across
    several requests.
    svenfila committed with rstoyanchev Jul 16, 2012
Commits on Jul 13, 2012
  1. @rstoyanchev

    Merge pull request #49 from rwinch/readme-include-test-scope

    * readme-include-test-scope:
      Update dependency declaration in README.md
    rstoyanchev committed Jul 13, 2012