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:
10: import java.io.File;
11:
12: public class DefaultTestFilter {
13: public boolean include(final String aClassName) {
14: String lFileName = aClassName.substring(aClassName
15: .lastIndexOf(File.separatorChar) + 1);
16: lFileName = SimpleTestFilter.getClassName(lFileName);
17: boolean result = lFileName.startsWith("Test")
18: && !lFileName.endsWith("Suite");
19: return result;
20: }//inclue()
21:
22: public boolean include(Class aClass) {
23: boolean result = TestCase.class.isAssignableFrom(aClass);
24: return result;
25: }//include()
26: }//class DefaultTestFilter
|