Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
946330a8
Commit
946330a8
authored
6 years ago
by
Dmitry Jemerov
Browse files
Options
Download
Email Patches
Plain Diff
Some javadoc and cleanup for IdeaTestExecutionPolicy
parent
6208453e
Branches unavailable
Tags unavailable
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
platform/testFramework/src/com/intellij/testFramework/fixtures/IdeaTestExecutionPolicy.java
+25
-3
...ellij/testFramework/fixtures/IdeaTestExecutionPolicy.java
platform/testFramework/src/com/intellij/testFramework/fixtures/SkipWithExecutionPolicy.java
+4
-0
...ellij/testFramework/fixtures/SkipWithExecutionPolicy.java
with
29 additions
and
3 deletions
+29
-3
platform/testFramework/src/com/intellij/testFramework/fixtures/IdeaTestExecutionPolicy.java
+
25
-
3
View file @
946330a8
...
@@ -13,10 +13,15 @@ import com.intellij.psi.PsiFile;
...
@@ -13,10 +13,15 @@ import com.intellij.psi.PsiFile;
import
com.intellij.testFramework.TestModeFlagListener
;
import
com.intellij.testFramework.TestModeFlagListener
;
import
com.intellij.testFramework.TestModeFlags
;
import
com.intellij.testFramework.TestModeFlags
;
import
com.intellij.testFramework.UsefulTestCase
;
import
com.intellij.testFramework.UsefulTestCase
;
import
com.intellij.testFramework.fixtures.impl.LightTempDirTestFixtureImpl
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
import
org.jetbrains.annotations.Nullable
;
/**
/**
* Allows to customize the test execution environment for the entire test execution without modifying the source code
* of tests. To specify a test execution policy, set the system property "idea.test.execution.policy" to the FQ name
* of a class implementing this interface.
*
* @author yole
* @author yole
*/
*/
public
abstract
class
IdeaTestExecutionPolicy
implements
TestModeFlagListener
{
public
abstract
class
IdeaTestExecutionPolicy
implements
TestModeFlagListener
{
...
@@ -24,9 +29,26 @@ public abstract class IdeaTestExecutionPolicy implements TestModeFlagListener {
...
@@ -24,9 +29,26 @@ public abstract class IdeaTestExecutionPolicy implements TestModeFlagListener {
TestModeFlags
.
addListener
(
this
);
TestModeFlags
.
addListener
(
this
);
}
}
public
abstract
void
setUp
(
Project
project
,
Disposable
testRootDisposable
,
String
testDataPath
);
/**
public
abstract
TempDirTestFixture
createTempDirTestFixture
();
* Performs the setup required in this test execution mode.
public
abstract
boolean
runInDispatchThread
();
*/
public
void
setUp
(
Project
project
,
Disposable
testRootDisposable
,
String
testDataPath
)
{
}
/**
* Creates the fixture for working with temporary files.
*/
public
TempDirTestFixture
createTempDirTestFixture
()
{
return
new
LightTempDirTestFixtureImpl
(
true
);
}
/**
* If true, the test method is invoked in the EDT. Otherwise, it runs on the test runner thread.
*/
public
boolean
runInDispatchThread
()
{
return
true
;
}
public
void
testFileConfigured
(
@NotNull
PsiFile
file
)
{
public
void
testFileConfigured
(
@NotNull
PsiFile
file
)
{
}
}
...
...
This diff is collapsed.
Click to expand it.
platform/testFramework/src/com/intellij/testFramework/fixtures/SkipWithExecutionPolicy.java
+
4
-
0
View file @
946330a8
...
@@ -6,6 +6,10 @@ import java.lang.annotation.Retention;
...
@@ -6,6 +6,10 @@ import java.lang.annotation.Retention;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
import
java.lang.annotation.Target
;
/**
* Marks a test as not applicable to a given test execution policy. If the value of this annotation
* matches the {@link IdeaTestExecutionPolicy#getName()} of the current test execution policy, the test will be skipped.
*/
@Target
(
ElementType
.
TYPE
)
@Target
(
ElementType
.
TYPE
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
SkipWithExecutionPolicy
{
public
@interface
SkipWithExecutionPolicy
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help