KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > junit > launcher > ITestKind


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  * David Saff (saff@mit.edu) - initial API and implementation
11  * (bug 102632: [JUnit] Support for JUnit 4.)
12  *******************************************************************************/

13
14 package org.eclipse.jdt.internal.junit.launcher;
15
16
17
18 public interface ITestKind {
19     static class NullTestKind extends TestKind {
20         private NullTestKind() {
21             super(null);
22         }
23
24         public boolean isNull() {
25             return true;
26         }
27
28         protected String JavaDoc getAttribute(String JavaDoc arg0) {
29             return null;
30         }
31         
32         public ITestFinder getFinder() {
33             return ITestFinder.NULL;
34         }
35         
36         public JUnitRuntimeClasspathEntry[] getClasspathEntries() {
37             return new JUnitRuntimeClasspathEntry[0];
38         }
39         
40     }
41     
42     public static final TestKind NULL = new NullTestKind();
43     
44     public static final String JavaDoc ID = "id"; //$NON-NLS-1$
45
public static final String JavaDoc DISPLAY_NAME = "displayName"; //$NON-NLS-1$
46
public static final String JavaDoc FINDER_CLASS_NAME = "finderClass"; //$NON-NLS-1$
47
public static final String JavaDoc LOADER_PLUGIN_ID = "loaderPluginId"; //$NON-NLS-1$
48
public static final String JavaDoc LOADER_CLASS_NAME = "loaderClass"; //$NON-NLS-1$
49
public static final String JavaDoc PRECEDES = "precedesTestKind"; //$NON-NLS-1$
50

51     public static final String JavaDoc RUNTIME_CLASSPATH_ENTRY = "runtimeClasspathEntry"; //$NON-NLS-1$
52

53     public static final String JavaDoc CLASSPATH_PLUGIN_ID = "pluginId"; //$NON-NLS-1$
54
public static final String JavaDoc CLASSPATH_PATH_TO_JAR = "pathToJar"; //$NON-NLS-1$
55

56     public abstract ITestFinder getFinder();
57
58     public abstract String JavaDoc getId();
59     public abstract String JavaDoc getDisplayName();
60     public abstract String JavaDoc getFinderClassName();
61     public abstract String JavaDoc getLoaderPluginId();
62     public abstract String JavaDoc getLoaderClassName();
63     public abstract String JavaDoc getPrecededKindId();
64     
65
66     public abstract boolean isNull();
67
68     public abstract JUnitRuntimeClasspathEntry[] getClasspathEntries();
69
70 }
Popular Tags