Class MockFilterConfig

java.lang.Object
org.springframework.mock.web.MockFilterConfig
All Implemented Interfaces:
FilterConfig

public class MockFilterConfig extends Object implements FilterConfig
Mock implementation of the FilterConfig interface.

Used for testing the web framework; also useful for testing custom Filter implementations.

Since:
1.0.2
Author:
Juergen Hoeller
See Also:
  • Constructor Details

    • MockFilterConfig

      public MockFilterConfig()
      Create a new MockFilterConfig with a default MockServletContext.
    • MockFilterConfig

      public MockFilterConfig(String filterName)
      Create a new MockFilterConfig with a default MockServletContext.
      Parameters:
      filterName - the name of the filter
    • MockFilterConfig

      public MockFilterConfig(@Nullable ServletContext servletContext)
      Create a new MockFilterConfig.
      Parameters:
      servletContext - the ServletContext that the servlet runs in
    • MockFilterConfig

      public MockFilterConfig(@Nullable ServletContext servletContext, String filterName)
      Create a new MockFilterConfig.
      Parameters:
      servletContext - the ServletContext that the servlet runs in
      filterName - the name of the filter
  • Method Details