01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.rewriter.test.util;
06:
07: import junit.framework.TestCase;
08: import junitx.util.SimpleTestFilter;
09: import junitx.util.TestFilter;
10:
11: import java.io.File;
12:
13: public class RewriterTestFilter implements TestFilter {
14: public boolean include(final String aClassName) {
15: String lFileName = aClassName.substring(aClassName
16: .lastIndexOf(File.separatorChar) + 1);
17: lFileName = SimpleTestFilter.getClassName(lFileName);
18: boolean result = lFileName.startsWith("Test")
19: && !lFileName.endsWith("Suite")
20: && !lFileName.endsWith("Cache")
21: && !lFileName.endsWith("RuleSetCLI")
22: && (lFileName.indexOf("IDSAME") == -1)
23: && (lFileName.indexOf("IDS") == -1)
24: && (lFileName.indexOf("JSURIUtils") == -1)
25: && (lFileName.indexOf("JSConvert") == -1);
26:
27: return result;
28: }//inclue()
29:
30: public boolean include(Class aClass) {
31: boolean result = TestCase.class.isAssignableFrom(aClass);
32: return result;
33: }//include()
34: }//class RewriterTestFilter
|