edu.rice.cs.drjava
Class DrJavaTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by edu.rice.cs.drjava.DrJavaTestCase
All Implemented Interfaces:
Test
Direct Known Subclasses:
AbstractDJDocumentTest, ArgumentTokenizerTest, BooleanOptionComponentTest, BooleanOptionTest, BraceInfoTest, BraceReductionTestCase, BraceTest, ClassAndInterfaceFinderTest, ColorOptionComponentTest, ColorOptionTest, CommandLineTest, CommentTest, CompilerErrorModelTest, ConfigFileTest, ConsoleDocumentTest, DebugWatchDataTest, DefinitionsDocumentTest, DependenciesTest, DocumentCacheTest, DocumentRegionTest, DrJavaBookTest, DummyGlobalModelTest, DummyOpenDefDocTest, EventNotifierTest, FileOpsTest, FileOptionComponentTest, FindReplaceMachineTest, FontOptionComponentTest, FontOptionTest, ForcedChoiceOptionComponentTest, ForcedChoiceOptionTest, GapTest, HighlightManagerTest, HistoryTest, IndentRulesTestCase, IndentTest, IntegerOptionComponentTest, IntegerOptionTest, IntegratedMasterSlaveTest, InteractionsDJDocumentTest, InteractionsDocumentTest, InteractionsModelTest, InteractionsPaneTest, JarCreationTest, JavadocModelTest, JavaInterpreterTest, JListSortNavigatorTest, JTreeSortNavigatorTest, KeyStrokeOptionComponentTest, KeyStrokeOptionTest, LongOptionTest, ModelListTest, MultiThreadedTestCase, MultiThreadedTestCaseTest, NewJVMTest, NonNegativeIntegerOptionTest, OptionMapLoaderTest, PredictiveInputModelTest, ProjectMenuTest, ProjectTest, ReaderWriterLockTest, RecentFileManagerTest, SavableConfigurationTest, SExpParserTest, StreamRedirectorTest, StringOpsTest, StringOptionTest, SwingDocumentTest, TestDocGetterTest, VectorFileOptionComponentTest, VectorKeyStrokeOptionComponentTest, VectorOptionTest, XMLProjectFileParserTest

public class DrJavaTestCase
extends TestCase

Test case class for all DrJava test cases. DrJava test cases should extend this class, potentially override setUp() and tearDown(), but make sure to invoke super.setUp() and super.tearDown() appropriately. That ensures that the system is correctly initialized for every test.


Nested Class Summary
 
Nested classes/interfaces inherited from class junit.framework.TestCase
TestCase.WrappedException
 
Field Summary
private static Log _log
           
 
Constructor Summary
DrJavaTestCase()
          Create a new DrJava test case.
DrJavaTestCase(String name)
          Create a new DrJava test case.
 
Method Summary
protected
<T> void
setConfigSetting(Option<T> op, T value)
           
protected static void setDocText(AbstractDJDocument doc, String text)
          Clears the text of the _doc field and sets it to the given string.
protected  void setUp()
          Set up for every test.
protected  void tearDown()
          Clean up for every test case.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_log

private static Log _log
Constructor Detail

DrJavaTestCase

public DrJavaTestCase()
Create a new DrJava test case.


DrJavaTestCase

public DrJavaTestCase(String name)
Create a new DrJava test case.

Parameters:
name - name of the test case
Method Detail

setUp

protected void setUp()
              throws Exception
Set up for every test.

Overrides:
setUp in class TestCase
Throws:
Exception - This convention is mandated by JUnit.TestCase, the superclass of this class.

tearDown

protected void tearDown()
                 throws Exception
Clean up for every test case. Only used in unit tests. Added because Windows would intermittently throw a java.util.concurrent.RejectedExecutionException during cleanup.

Overrides:
tearDown in class TestCase
Throws:
Exception

setConfigSetting

protected <T> void setConfigSetting(Option<T> op,
                                    T value)

setDocText

protected static final void setDocText(AbstractDJDocument doc,
                                       String text)
Clears the text of the _doc field and sets it to the given string.