Package org.springframework.mock.web

Examples of org.springframework.mock.web.MockServletContext


  protected Entry<ConfigToken<?>, Object> entry;
 
  @Before
  public void setup() {
    processor = getProcessor();
    MockServletContext mockServletContext = new MockServletContext();
    MockPageContext mockPageContext = new MockPageContext(mockServletContext);
    request = (HttpServletRequest) mockPageContext.getRequest();
    confToBeApplied = new HashMap<ConfigToken<?>, Object>();
    tableConfiguration = new TableConfiguration(confToBeApplied, null, request);
    tableConfiguration.setTableId("fakeId");
View Full Code Here


  protected HttpServletRequest request;
  protected Map<ConfigToken<?>, Object> confToBeApplied;

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

  protected HttpServletRequest request;
  protected Map<ConfigToken<?>, Object> confToBeApplied;

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

  protected Map<String, Object> mainConf;
 
  @Before
  public void setup() {
    // mock ServletContext
    MockServletContext mockServletContext = new MockServletContext();

    // mock PageContext
    mockPageContext = new MockPageContext(mockServletContext);
    mockPageContext.getRequest().setAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE, new Context(new MockFilterConfig()));
    buildTable();
View Full Code Here

  protected Map<String, Object> mainConf;
 
  @Before
  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();
View Full Code Here

  private HttpServletRequest request;
  private ExportConf fakeExportConf;
 
  @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)
View Full Code Here

  private HttpServletRequest request;
  private MockHttpServletResponse response;

  @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 HttpServletRequest request;
  private HttpServletResponse response;
 
  @Before
  public void createHtmlTable() {
    mockServletContext = new MockServletContext();
    mockPageContext = new MockPageContext(mockServletContext);
    request = (HttpServletRequest) mockPageContext.getRequest();
    request.setAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE, new Context(new MockFilterConfig()));
    response = (HttpServletResponse) mockPageContext.getResponse();
    System.setProperty(DandelionConfig.DANDELION_MODE.getName(), DandelionMode.DEVELOPMENT.toString());
View Full Code Here

    public void onSetUp() {
        String appPackage = "org.appfuse.webapp";
        String appName = "app";


        servletContext = new MockServletContext("");

        // mock servlet settings
        servletContext.addInitParameter(SpringConstants.USE_EXTERNAL_SPRING_CONTEXT, "true");
        servletContext.addInitParameter(ContextLoader.CONFIG_LOCATION_PARAM,
                StringUtils.arrayToCommaDelimitedString(locations)
View Full Code Here

  MockPageContext mockPageContext;
  StandardConfigurationLoader loader;
 
  @Before
  public void setup() {
    MockServletContext mockServletContext = new MockServletContext();
    mockPageContext = new MockPageContext(mockServletContext);
    request = (HttpServletRequest) mockPageContext.getRequest();
    loader = new StandardConfigurationLoader();
    loader.loadDefaultConfiguration();
   
View Full Code Here

TOP

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

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.