public class TestEnvironment extends Object
Modifier and Type | Field and Description |
---|---|
TemporaryDirectoryAllocator |
temporaryDirectoryAllocator |
HudsonTestCase |
testCase
Current test case being run (null for a JUnit 4 test).
|
Constructor and Description |
---|
TestEnvironment(org.junit.runner.Description description) |
TestEnvironment(HudsonTestCase testCase) |
Modifier and Type | Method and 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() |
@CheckForNull public final HudsonTestCase testCase
public final TemporaryDirectoryAllocator temporaryDirectoryAllocator
public TestEnvironment(@NonNull HudsonTestCase testCase)
public TestEnvironment(@NonNull org.junit.runner.Description description)
@NonNull public org.junit.runner.Description description()
Description.getTestClass()
is currently broken in some environments (claimed fixed in JUnit 4.11). Use Description.getClassName()
instead.public void pin()
public void dispose() throws IOException, InterruptedException
IOException
InterruptedException
public static TestEnvironment get()
Copyright © 2004–2022. All rights reserved.