Package net.sourceforge.stripes.mock

Examples of net.sourceforge.stripes.mock.MockServletContext


    }

    public TestEngine( Properties props )
        throws WikiException
    {
        super( new MockServletContext( "test" ), "test", cleanTestProps( props ) );
       
        // Stash the WikiEngine in the servlet context
        ServletContext servletContext = this.getServletContext();
        servletContext.setAttribute("com.ecyrd.jspwiki.WikiEngine", this);
    }
View Full Code Here


    }

    public TestEngine( Properties props )
        throws WikiException
    {
        super( new MockServletContext( "test" ), "test", cleanTestProps( props ) );
       
        // Stash the WikiEngine in the servlet context
        ServletContext servletContext = this.getServletContext();
        servletContext.setAttribute("org.apache.wiki.WikiEngine", this);
    }
View Full Code Here

    }

    public TestEngine( Properties props )
        throws WikiException
    {
        super( new MockServletContext( "test" ), "test", cleanTestProps( props ) );
       
        // Stash the WikiEngine in the servlet context
        ServletContext servletContext = this.getServletContext();
        servletContext.setAttribute("org.apache.wiki.WikiEngine", this);
    }
View Full Code Here

    }

    public TestEngine( Properties props )
        throws WikiException
    {
        super( new MockServletContext( "test" ), "test", cleanTestProps( props ) );
       
        // Stash the WikiEngine in the servlet context
        ServletContext servletContext = this.getServletContext();
        servletContext.setAttribute("org.apache.wiki.WikiEngine", this);
    }
View Full Code Here

    @SuppressWarnings("unchecked")
  public void setTypelessMap(Map typelessMap) { this.typelessMap = typelessMap; }

    /** Helper method to create a roundtrip with the TestActionBean class. */
    protected MockRoundtrip getRoundtrip() {
        MockServletContext context = StripesTestFixture.getServletContext();
        return new MockRoundtrip(context, MapBindingTests.class);
    }
View Full Code Here

        return null;
    }

    @Test(groups="fast")
    public void positiveCase() throws Exception {
        MockServletContext ctx = StripesTestFixture.getServletContext();
        MockRoundtrip trip = new MockRoundtrip(ctx, FlashScopeTests.class);
        trip.addParameter("foo", "foo123");
        trip.execute();

        String url = trip.getDestination();
View Full Code Here

*/
public class InvalidDateKeyBreaksInvariant_STS_651 {

    /** Helper method to create a roundtrip with the TestActionBean class. */
    protected MockRoundtrip getRoundtrip() {
        MockServletContext context = StripesTestFixture.getServletContext();
        return new MockRoundtrip(context, MapBindingTests.class);
    }
View Full Code Here

*/
public class BasicBindingTests {

    /** Helper method to create a roundtrip with the TestActionBean class. */
    protected MockRoundtrip getRoundtrip() {
        MockServletContext context = StripesTestFixture.getServletContext();
        return new MockRoundtrip(context, TestActionBean.class);
    }
View Full Code Here

     *
     * @return an instance of MockServletContext for testing wiith
     */
    public static synchronized MockServletContext getServletContext() {
        if (context == null) {
            context = new MockServletContext("test");

            // Add the Stripes Filter
            Map<String,String> filterParams = new HashMap<String,String>();
            filterParams.put("ActionResolver.Packages", "net.sourceforge.stripes");
            filterParams.put("LocalePicker.Class", "net.sourceforge.stripes.localization.MockLocalePicker");
View Full Code Here

    }

    public TestEngine( Properties props )
        throws WikiException
    {
        super( new MockServletContext( "test" ), "test", cleanTestProps( props ) );

        // Stash the WikiEngine in the servlet context
        ServletContext servletContext = this.getServletContext();
        servletContext.setAttribute("org.apache.wiki.WikiEngine", this);
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.mock.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.