Package org.springframework.mock.web

Examples of org.springframework.mock.web.MockFilterConfig


    MockFilter filter = (MockFilter) applicationContext.getBean("mockFilter", MockFilter.class);
    assertFalse(filter.isInitialized());
    assertFalse(filter.isDoFiltered());
    assertFalse(filter.isDestroyed());

    filter.init(new MockFilterConfig());
    assertTrue(filter.isInitialized());
    assertFalse(filter.isDoFiltered());
    assertFalse(filter.isDestroyed());

    MockHttpServletRequest request = new MockHttpServletRequest();
View Full Code Here


    setupFilter();
  }

  protected void setupFilter() throws ServletException {
    MockFilterConfig config = new MockFilterConfig();
    config.addInitParameter(ProcessEngineAuthenticationFilter.AUTHENTICATION_PROVIDER_PARAM, HttpBasicAuthenticationProvider.class.getName());
    authenticationFilter = new ProcessEngineAuthenticationFilter();
    authenticationFilter.init(config);
  }
View Full Code Here

  @Before
  public void setup() {
    MockServletContext mockServletContext = new MockServletContext();
    MockPageContext mockPageContext = new MockPageContext(mockServletContext);
    request = (HttpServletRequest) mockPageContext.getRequest();
    request.setAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE, new Context(new MockFilterConfig()));
    confToBeApplied = new HashMap<ConfigToken<?>, Object>();
    tableConfiguration = new TableConfiguration(confToBeApplied, null, request);
    columnConfiguration = new ColumnConfiguration();
  }
View Full Code Here

  public void setup() {
    processor = getProcessor();
    MockServletContext mockServletContext = new MockServletContext();
    MockPageContext mockPageContext = new MockPageContext(mockServletContext);
    request = (HttpServletRequest) mockPageContext.getRequest();
    request.setAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE, new Context(new MockFilterConfig()));
    confToBeApplied = new HashMap<ConfigToken<?>, Object>();
    tableConfiguration = new TableConfiguration(confToBeApplied, null, request);
    tableConfiguration.setTableId("fakeId");
  }
View Full Code Here

    // mock ServletContext
    MockServletContext mockServletContext = new MockServletContext();

    // mock PageContext
    mockPageContext = new MockPageContext(mockServletContext);
    mockPageContext.getRequest().setAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE, new Context(new MockFilterConfig()));
    buildTable();
   
    try {
      tableTagBuilder.getTableTag().doStartTag();
      for (int i = 0; i < Mock.persons.size(); i++) {
View Full Code Here

  public void setupTest() throws JspException {
   
    MockServletContext mockServletContext = new MockServletContext();

    mockPageContext = new MockPageContext(mockServletContext);
    mockPageContext.getRequest().setAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE, new Context(new MockFilterConfig()));
   
    tableTagBuilder = new TableTagBuilder(Mock.persons, "myTableId").context(mockPageContext).defaultTable();
    tableTag = tableTagBuilder.getTableTag();

    extraHtmlTag = new ExtraHtmlTag();
View Full Code Here

  protected Map<String, Object> mainConfig;
 
  @Before
  public void setup() {
    request = new MockHttpServletRequest();
    request.setAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE, new Context(new MockFilterConfig()));
    table = new HtmlTable("fakeId", request, response);
    table.getTableConfiguration().getConfigurations().clear();
    table.addHeaderRow();
    table.getLastHeaderRow().addHeaderColumn("column1");
    table.getLastHeaderRow().addHeaderColumn("column2");
View Full Code Here

  @Before
  public void setup(){
    mockServletContext = new MockServletContext();
    mockPageContext = new MockPageContext(mockServletContext);
    request = (HttpServletRequest) mockPageContext.getRequest();
    request.setAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE, new Context(new MockFilterConfig()));
    fakeExportConf = new ExportConf.Builder("csv")
      .header(true)
      .exportClass(new CsvExport())
      .build();
  }
View Full Code Here

  @Before
  public void setup() {
    mockServletContext = new MockServletContext();
    mockPageContext = new MockPageContext(mockServletContext);
    request = (HttpServletRequest) mockPageContext.getRequest();
    request.setAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE, new Context(new MockFilterConfig()));
  }
View Full Code Here

  private HtmlColumn firstColumn;

  @Before
  public void createMainGenerator() {
    request = new MockHttpServletRequest();
    request.setAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE, new Context(new MockFilterConfig()));
    response = new MockHttpServletResponse();
    generator = new ColumnFilteringGenerator();
  }
View Full Code Here

TOP

Related Classes of org.springframework.mock.web.MockFilterConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.