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

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--edu.rice.cs.drjava.model.GlobalModelTestCase
                    |
                    +--edu.rice.cs.drjava.model.junit.JUnitErrorModelTest
All Implemented Interfaces:
Test

public class JUnitErrorModelTest
extends GlobalModelTestCase

A test on the GlobalModel for JUnit testing.

Version:
$Id: JUnitErrorModelTest.java,v 1.2 2002/08/15 23:03:57 jhsia Exp $

Inner classes inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase
GlobalModelTestCase.CancelingSelector, GlobalModelTestCase.CompileShouldFailListener, GlobalModelTestCase.CompileShouldSucceedListener, GlobalModelTestCase.FileSelector, GlobalModelTestCase.OpenWarningException, GlobalModelTestCase.OverwriteException, GlobalModelTestCase.TestListener, GlobalModelTestCase.WarningFileSelector
 
Field Summary
private  JUnitErrorModel _m
           
private  String _testString
           
private static String MONKEYTEST_FAIL_TEXT
           
private static String NONPUBLIC_TEXT
           
 
Fields inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase
_model, _originalModel, _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 junit.framework.TestCase
fName
 
Constructor Summary
JUnitErrorModelTest(String name)
          Constructor.
 
Method Summary
static Test suite()
          Creates a test suite for JUnit to run.
 void testClearOthersWhenJUnitRun()
          Tests that the JUnitErrorModel contained within any other open documents is cleared when JUnit is run on a given document.
 void testErrorsArrayInOrder()
          Tests that the errors array contains all encountered failures and errors in the right order.
 void testSubstring()
           
 
Methods inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase
assertCompileErrorsPresent, assertCompileErrorsPresent, assertContents, assertLength, assertModified, assertNumOpenDocs, changeDocumentText, classForJava, createFile, createModel, interpret, interpretIgnoreResult, setUp, setupDocument, tearDown, tempDirectory, tempFile, tempFile, writeToNewTempFile
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

_m

private JUnitErrorModel _m

_testString

private String _testString

MONKEYTEST_FAIL_TEXT

private static final String MONKEYTEST_FAIL_TEXT

NONPUBLIC_TEXT

private static final String NONPUBLIC_TEXT
Constructor Detail

JUnitErrorModelTest

public JUnitErrorModelTest(String name)
Constructor.
Parameters:
String - name
Method Detail

suite

public static Test suite()
Creates a test suite for JUnit to run.
Returns:
a test suite based on the methods in this class

testSubstring

public void testSubstring()

testErrorsArrayInOrder

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

testClearOthersWhenJUnitRun

public void testClearOthersWhenJUnitRun()
                                 throws Exception
Tests that the JUnitErrorModel contained within any other open documents is cleared when JUnit is run on a given document.