From 8b24b1cf7ace470a52ae597d0d40e6712bfd3245 Mon Sep 17 00:00:00 2001 From: Ray Krueger Date: Wed, 23 Feb 2005 02:47:31 +0000 Subject: [PATCH] MockFilterChain extended TestCase but had no public constructor and no test methods. The expectedToProceed test is internally handled by a static call to TestCase.assertTrue() and TestCase.fail() --- .../org/acegisecurity/util/MockFilterChain.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/core/src/test/java/org/acegisecurity/util/MockFilterChain.java b/core/src/test/java/org/acegisecurity/util/MockFilterChain.java index 9f27764eaa..14925ed110 100644 --- a/core/src/test/java/org/acegisecurity/util/MockFilterChain.java +++ b/core/src/test/java/org/acegisecurity/util/MockFilterChain.java @@ -17,12 +17,11 @@ package net.sf.acegisecurity.util; import junit.framework.TestCase; -import java.io.IOException; - import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; +import java.io.IOException; /** @@ -31,7 +30,7 @@ import javax.servlet.ServletResponse; * @author Ben Alex * @version $Id$ */ -public class MockFilterChain extends TestCase implements FilterChain { +public class MockFilterChain implements FilterChain { //~ Instance fields ======================================================== private boolean expectToProceed; @@ -42,18 +41,14 @@ public class MockFilterChain extends TestCase implements FilterChain { this.expectToProceed = expectToProceed; } - private MockFilterChain() { - super(); - } - //~ Methods ================================================================ public void doFilter(ServletRequest request, ServletResponse response) - throws IOException, ServletException { + throws IOException, ServletException { if (expectToProceed) { - assertTrue(true); + TestCase.assertTrue(true); } else { - fail("Did not expect filter chain to proceed"); + TestCase.fail("Did not expect filter chain to proceed"); } } }