Package net.sourceforge.pebble.mock

Examples of net.sourceforge.pebble.mock.MockHttpServletRequest


  protected Model model;

  protected void setUp() throws Exception {
    super.setUp();

    request = new MockHttpServletRequest();
    response = new MockHttpServletResponse();

    model = new Model();
    model.put(Constants.BLOG_KEY, blog);
    action.setModel(model);
View Full Code Here


  private SimpleDateFormat httpFormat;

  @Before
  public void setUp() {
    service = new DefaultLastModifiedService();
    request = new MockHttpServletRequest();
    response = new MockHttpServletResponse();
    httpFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z");
    httpFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
  }
View Full Code Here

    model.put(Constants.BLOG_ENTRIES, Collections.singleton(entry));

    SyndFeed feed = feedView.getFeed();
    MockHttpServletResponse response = new MockHttpServletResponse();
    response.setWriter(new PrintWriter(System.out));
    feedView.dispatch(new MockHttpServletRequest(), response, null);
    assertEquals("tag:www.yourdomain.com,0000-00-00:default", feed.getUri());
    assertEquals("My blog", feed.getTitle());
    assertEquals(1, feed.getEntries().size());
    SyndEntry feedEntry = (SyndEntry) feed.getEntries().get(0);
    assertEquals("tag:www.yourdomain.com,1970-01-01:default/1000", feedEntry.getUri());
View Full Code Here

    super.setUp();

    filter = new TransformingFilter();
    config = new MockFilterConfig();
    filter.init(config);
    request = new MockHttpServletRequest();
    request.setContextPath("/somecontext");
    request.setRequestUri("/somecontext/");
    response = new MockHttpServletResponse();
  }
View Full Code Here

    super.setUp();

    filter = new TransformingFilter();
    config = new MockFilterConfig();
    filter.init(config);
    request = new MockHttpServletRequest();
    request.setContextPath("/somecontext");
    request.setRequestUri("/somecontext/");
    request.setAttribute(Constants.BLOG_KEY, blog);
    response = new MockHttpServletResponse();
  }
View Full Code Here

    super.setUp();

    filter = new BlogLookupFilter();
    config = new MockFilterConfig();
    filter.init(config);
    request = new MockHttpServletRequest();
    request.setContextPath("/somecontext");
    request.setRequestUri("/somecontext/");
    response = new MockHttpServletResponse();
  }
View Full Code Here

    super.setUp();

    filter = new BlogLookupFilter();
    config = new MockFilterConfig();
    filter.init(config);
    request = new MockHttpServletRequest();
    request.setContextPath("/somecontext");
    request.setRequestUri("/somecontext/");
    response = new MockHttpServletResponse();
  }
View Full Code Here

    super.setUp();

    filter = new DispatchingFilter();
    config = new MockFilterConfig();
    filter.init(config);
    request = new MockHttpServletRequest();
    request.setContextPath("/somecontext");
    request.setRequestUri("/somecontext/");
    request.setAttribute(Constants.BLOG_KEY, blog);
    response = new MockHttpServletResponse();
  }
View Full Code Here

  protected void setUp() throws Exception {
    super.setUp();

    action = new FeedAction();
    request = new MockHttpServletRequest();
    response = new MockHttpServletResponse();
    Model model = new Model();
    model.put(Constants.BLOG_KEY, blog1);
    action.setModel(model);
    lastModifiedService = mock(LastModifiedService.class);
View Full Code Here

  protected Model model;

  protected void setUp() throws Exception {
    super.setUp();

    request = new MockHttpServletRequest();
    response = new MockHttpServletResponse();

    model = new Model();
    model.put(Constants.BLOG_KEY, blog);
    action.setModel(model);
View Full Code Here

TOP

Related Classes of net.sourceforge.pebble.mock.MockHttpServletRequest

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.