FileDocCategorySizeDatePackage
MockFilterChain.javaAPI DocExample1155Sat Mar 15 19:39:50 GMT 2003com.oreilly.javaxp.cactus.filter

MockFilterChain

public class MockFilterChain extends Object implements FilterChain
author
Brian M. Coyner $version $Id: MockFilterChain.java,v 1.4 2003/02/27 00:24:43 jepc Exp $

Fields Summary
private boolean
shouldBeInvoked
private boolean
wasInvoked
Constructors Summary
Methods Summary
public voiddoFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res)

        this.wasInvoked = true;
    
public voidsetExpectedInvocation(boolean shouldBeInvoked)

        this.shouldBeInvoked = shouldBeInvoked;
    
public voidverify()


        if (this.shouldBeInvoked) {
            Assert.assertTrue("Expected MockFilterChain to be invoked.",
                              this.wasInvoked);
        } else {
            Assert.assertTrue("Expected MockFilterChain filter not to be invoked.",
                              !this.wasInvoked);
        }