Package org.jvnet.hudson.test
Class TestEnvironment
- java.lang.Object
-
- org.jvnet.hudson.test.TestEnvironment
-
public class TestEnvironment extends Object
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description TemporaryDirectoryAllocator
temporaryDirectoryAllocator
HudsonTestCase
testCase
Current test case being run (null for a JUnit 4 test).
-
Constructor Summary
Constructors Constructor Description TestEnvironment(org.junit.runner.Description description)
TestEnvironment(HudsonTestCase testCase)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runner.Description
description()
Current test case being run (works for JUnit 3 or 4).void
dispose()
static TestEnvironment
get()
void
pin()
String
toString()
-
-
-
Field Detail
-
testCase
@CheckForNull public final HudsonTestCase testCase
Current test case being run (null for a JUnit 4 test).
-
temporaryDirectoryAllocator
public final TemporaryDirectoryAllocator temporaryDirectoryAllocator
-
-
Constructor Detail
-
TestEnvironment
public TestEnvironment(@NonNull HudsonTestCase testCase)
-
TestEnvironment
public TestEnvironment(@NonNull org.junit.runner.Description description)
-
-
Method Detail
-
description
@NonNull public org.junit.runner.Description description()
Current test case being run (works for JUnit 3 or 4). Warning:Description.getTestClass()
is currently broken in some environments (claimed fixed in JUnit 4.11). UseDescription.getClassName()
instead.
-
pin
public void pin()
-
dispose
public void dispose() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
get
public static TestEnvironment get()
-
-