| java.lang.Object org.netbeans.modules.junit.plugin.JUnitPlugin
All known Subclasses: org.netbeans.modules.junit.DefaultPlugin,
JUnitPlugin | abstract public class JUnitPlugin (Code) | | SPI for custom implementations of support for JUnit.
It declares methods for:
author: Marian Petras |
Inner Class :public enum CreateTestParam | |
Inner Class :final public static class Location | |
Constructor Summary | |
protected | JUnitPlugin() Default constructor for use by subclasses. |
Method Summary | |
protected boolean | canCreateTests(FileObject... fileObjects) Informs whether the plugin is capable of creating tests at the moment. | protected boolean | createTestActionCalled(FileObject[] selectedFiles) Called immediately after the Create Test action was called.
It can be used as a trigger for additional checks and/or for displaying
user dialogs etc. | abstract protected FileObject[] | createTests(FileObject[] filesToTest, FileObject targetRoot, Map<CreateTestParam, Object> params) Creates test classes for given source classes. | abstract protected Location | getTestLocation(Location sourceLocation) Returns a specification of a Java element or file representing test
for the given source Java element or file. | abstract protected Location | getTestedLocation(Location testLocation) Returns a specification of a Java element or file that is tested
by the given test Java element or test file. |
JUnitPlugin | protected JUnitPlugin()(Code) | | Default constructor for use by subclasses.
|
canCreateTests | protected boolean canCreateTests(FileObject... fileObjects)(Code) | | Informs whether the plugin is capable of creating tests at the moment.
The default implementation returns
true .
true if the plugin is able of creating testsfor the given FileObject s, false otherwise See Also: JUnitPlugin.createTests |
createTestActionCalled | protected boolean createTestActionCalled(FileObject[] selectedFiles)(Code) | | Called immediately after the Create Test action was called.
It can be used as a trigger for additional checks and/or for displaying
user dialogs etc. It is always called from the event-dispatching thread.
Parameters: selectedFiles - files and folders/packages that were selectedwhen the action was called true if the action can continue, false if the action should not continue;the default implementation returns always true |
createTests | abstract protected FileObject[] createTests(FileObject[] filesToTest, FileObject targetRoot, Map<CreateTestParam, Object> params)(Code) | | Creates test classes for given source classes.
If the plugin does not support creating tests, implementation of this
method should return
null .
Parameters: filesToTest - source files for which test classes should becreated Parameters: targetRoot - root folder of the target source root Parameters: params - parameters of creating test class- each key is an Integer whose value is equalto some of the constants defined in the class;the value is eithera String (for key with value CLASS_NAME )or a Boolean (for other keys) created test files, or null if no test classes werecreated and/or updated See Also: JUnitPlugin.canCreateTests |
getTestLocation | abstract protected Location getTestLocation(Location sourceLocation)(Code) | | Returns a specification of a Java element or file representing test
for the given source Java element or file.
Parameters: sourceLocation - specification of a Java element or file specification of a corresponding test Java element or file,or null if no corresponding test Java file is available |
getTestedLocation | abstract protected Location getTestedLocation(Location testLocation)(Code) | | Returns a specification of a Java element or file that is tested
by the given test Java element or test file.
Parameters: testLocation - specification of a Java element or file specification of a Java element or file that is testedby the given Java element or file. |
|
|