edu.rice.cs.drjava.model.junit
Class JUnitErrorModelTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by edu.rice.cs.drjava.DrJavaTestCase
              extended by edu.rice.cs.drjava.model.MultiThreadedTestCase
                  extended by edu.rice.cs.drjava.model.GlobalModelTestCase
                      extended by edu.rice.cs.drjava.model.junit.JUnitErrorModelTest
All Implemented Interfaces:
Test

public final class JUnitErrorModelTest
extends GlobalModelTestCase

A test on the GlobalModel for JUnit testing.

Version:
$Id: JUnitErrorModelTest.java 5444 2011-08-17 07:54:58Z rcartwright $

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase
GlobalModelTestCase.CancelingSelector, GlobalModelTestCase.CompileShouldFailListener, GlobalModelTestCase.CompileShouldSucceedListener, GlobalModelTestCase.FileMovedWarningException, GlobalModelTestCase.FileSelector, GlobalModelTestCase.InteractionListener, GlobalModelTestCase.JUnitNonTestListener, GlobalModelTestCase.JUnitTestListener, GlobalModelTestCase.OpenWarningException, GlobalModelTestCase.OverwriteException, GlobalModelTestCase.SaveCopyFileSelector, GlobalModelTestCase.TestGlobalModel, GlobalModelTestCase.TestListener, GlobalModelTestCase.WarningFileSelector
 
Nested classes/interfaces inherited from class junit.framework.TestCase
TestCase.WrappedException
 
Field Summary
protected static Log _log
           
private  JUnitErrorModel _m
           
private static String ABC_CLASS_ONE
           
private static String ABC_CLASS_TWO
           
private static String ABC_TEST
           
private static String LANGUAGE_LEVEL_TEST
           
private static String MONKEYTEST_FAIL_TEXT
           
private static String TEST_ONE
           
private static String TEST_TWO
           
 
Fields inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase
_doc, _interactionsController, _model, _tempDir, BAR_TEXT, BAZ_TEXT, FOO_MISSING_CLOSE_TEXT, FOO_PACKAGE_AFTER_IMPORT, FOO_PACKAGE_AS_FIELD, FOO_PACKAGE_AS_FIELD_2, FOO_PACKAGE_AS_PART_OF_FIELD, FOO_PACKAGE_INSIDE_CLASS, FOO_TEXT
 
Fields inherited from class edu.rice.cs.drjava.model.MultiThreadedTestCase
_testFailed
 
Constructor Summary
JUnitErrorModelTest()
           
 
Method Summary
 void testErrorInSuperClass_NOJOIN()
          Test errors that occur in superclass.
 void testErrorsArrayInOrder_NOJOIN()
          Tests that the errors array contains all encountered failures and error in the right order.
 void testVerifyErrorHandledCorrectly_NOJOIN()
          Tests that a VerifyError is reported as an error, rather than simply causing JUnit to blow up.
 
Methods inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase
assertCompileErrorsPresent, assertCompileErrorsPresent, assertContents, assertInteractionsContains, assertInteractionsDoesNotContain, assertInteractionsDoesNotMatch, assertInteractionsMatches, assertLength, assertModified, assertNumOpenDocs, changeDocumentText, classForJava, createFile, doCompile, doCompile, getCompilerErrorString, getInteractionsText, interpret, interpretIgnoreResult, safeLoadHistory, safeSaveHistory, saveAllFiles, saveFile, saveFileAs, saveFileCopy, setUp, setupDocument, tearDown, tempDirectory, tempFile, tempFile, testStartCompile, writeToNewTempFile
 
Methods inherited from class edu.rice.cs.drjava.model.MultiThreadedTestCase
join, listenerFail, listenerFail, wait
 
Methods inherited from class edu.rice.cs.drjava.DrJavaTestCase
setConfigSetting, setDocText
 
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

_m

private volatile JUnitErrorModel _m

_log

protected static final Log _log

MONKEYTEST_FAIL_TEXT

private static final String MONKEYTEST_FAIL_TEXT
See Also:
Constant Field Values

TEST_ONE

private static final String TEST_ONE
See Also:
Constant Field Values

TEST_TWO

private static final String TEST_TWO
See Also:
Constant Field Values

ABC_CLASS_ONE

private static final String ABC_CLASS_ONE
See Also:
Constant Field Values

ABC_CLASS_TWO

private static final String ABC_CLASS_TWO
See Also:
Constant Field Values

ABC_TEST

private static final String ABC_TEST
See Also:
Constant Field Values

LANGUAGE_LEVEL_TEST

private static final String LANGUAGE_LEVEL_TEST
See Also:
Constant Field Values
Constructor Detail

JUnitErrorModelTest

public JUnitErrorModelTest()
Method Detail

testErrorsArrayInOrder_NOJOIN

public void testErrorsArrayInOrder_NOJOIN()
                                   throws Exception
Tests that the errors array contains all encountered failures and error in the right order.

Throws:
Exception

testVerifyErrorHandledCorrectly_NOJOIN

public void testVerifyErrorHandledCorrectly_NOJOIN()
                                            throws Exception
Tests that a VerifyError is reported as an error, rather than simply causing JUnit to blow up. Note that this test will hang if the error is not reported correctly, because the JUnitTestManager will blow up in the other JVM and never notify us that it's finished.

Throws:
Exception

testErrorInSuperClass_NOJOIN

public void testErrorInSuperClass_NOJOIN()
                                  throws Exception
Test errors that occur in superclass.

Throws:
Exception