org.jvnet.hudson.test
Class TestEnvironment

java.lang.Object
  extended by org.jvnet.hudson.test.TestEnvironment

public class TestEnvironment
extends Object

TODO: deprecate this, and just consolidate this to HudsonTestCase. We can then pin down the current HudsonTestCase to the thread for easier access.

Author:
Kohsuke Kawaguchi

Field Summary
 TemporaryDirectoryAllocator temporaryDirectoryAllocator
           
 HudsonTestCase testCase
          Current test case being run (null for a JUnit 4 test).
 
Constructor Summary
TestEnvironment(org.junit.runner.Description description)
           
TestEnvironment(HudsonTestCase testCase)
           
 
Method Summary
 org.junit.runner.Description description()
          Current test case being run (works for JUnit 3 or 4).
 void dispose()
           
static TestEnvironment get()
           
 void pin()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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). Use Description.getClassName() instead.


pin

public void pin()

dispose

public void dispose()
             throws IOException,
                    InterruptedException
Throws:
IOException
InterruptedException

get

public static TestEnvironment get()


Copyright © 2004-2013. All Rights Reserved.