|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
edu.rice.cs.drjava.DrJavaTestCase
edu.rice.cs.drjava.CommandLineTest
public final class CommandLineTest
Tests opening/creating files specified as command line arguments.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class junit.framework.TestCase |
|---|
TestCase.WrappedException |
| Field Summary | |
|---|---|
private Log |
_log
|
private MainFrame |
_mf
The MainFrame we're working with. |
private File |
f1
Files that exist, and the filenames that represent them. |
private String |
f1_contents
|
private String |
f1_name
|
private File |
f2
|
private String |
f2_contents
|
private String |
f2_name
|
private File |
f3
|
private String |
f3_contents
|
private String |
f3_name
|
private File |
f4
|
private String |
f4_contents
|
private String |
f4_name
|
private File |
f5
|
private String |
f5_contents
|
private String |
f5_name
|
private File |
f6
|
private String |
f6_contents
|
private String |
f6_name
|
private File |
f7
|
private String |
f7_contents
|
private String |
f7_name
|
private File |
f8
|
private String |
f8_contents
|
private String |
f8_name
|
private static char |
FS
File separator, i.e. |
private File |
nof1
Files that do not exist (constructor deletes them), and their filenames. |
private String |
nof1_name
|
private File |
nof2
|
private String |
nof2_name
|
private File |
nof3
|
private String |
nof3_name
|
private File |
nof4
|
private String |
nof4_name
|
private File |
nof5
|
private String |
nof5_name
|
| Constructor Summary | |
|---|---|
CommandLineTest(String name)
Constructor. |
|
| Method Summary | |
|---|---|
private void |
checkFile(File relativeFile,
String funnyName)
Helper for testRelativeFile and testDotPaths. |
private File |
mkTempDir(String funnyName)
Helper for testRelativeFile and testDotPaths. |
void |
setUp()
Set up for every test. |
void |
tearDown()
Clean up for every test case. |
void |
testDotPaths()
Tests paths with "." and ".." in them. |
void |
testDups()
Test duplicate files. |
void |
testMixed()
Supplying both valid and invalid filenames on the command line. |
void |
testNE()
A nonexistent file. |
void |
testNone()
Tests DrJava with no command line arguments. |
void |
testOpenMany()
Many files on the command line. |
void |
testOpenOne()
Open one file on the command line. |
void |
testRelativePath()
A regression test for bug #542747, which related to opening a file via the command line using a relative path. |
| 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 |
|---|
private static final char FS
private MainFrame _mf
private volatile File f1
private volatile String f1_name
private volatile String f1_contents
private volatile File f2
private volatile String f2_name
private volatile String f2_contents
private volatile File f3
private volatile String f3_name
private volatile String f3_contents
private volatile File f4
private volatile String f4_name
private volatile String f4_contents
private volatile File f5
private volatile String f5_name
private volatile String f5_contents
private volatile File f6
private volatile String f6_name
private volatile String f6_contents
private volatile File f7
private volatile String f7_name
private volatile String f7_contents
private volatile File f8
private volatile String f8_name
private volatile String f8_contents
private volatile File nof1
private volatile File nof2
private volatile File nof3
private volatile File nof4
private volatile File nof5
private volatile String nof1_name
private volatile String nof2_name
private volatile String nof3_name
private volatile String nof4_name
private volatile String nof5_name
private Log _log
| Constructor Detail |
|---|
public CommandLineTest(String name)
name - the name of the test case| Method Detail |
|---|
public void setUp()
throws Exception
DrJavaTestCase
setUp in class DrJavaTestCaseException - This convention is mandated by JUnit.TestCase, the superclass of this class.
public void tearDown()
throws Exception
DrJavaTestCase
tearDown in class DrJavaTestCaseExceptionpublic void testNone()
public void testOpenOne()
throws BadLocationException
BadLocationExceptionpublic void testNE()
public void testOpenMany()
throws BadLocationException
BadLocationException
public void testMixed()
throws BadLocationException
BadLocationException
public void testDups()
throws BadLocationException
BadLocationException
public void testRelativePath()
throws IOException,
InvalidPackageException
IOException
InvalidPackageExceptionpublic void testDotPaths()
private File mkTempDir(String funnyName)
private void checkFile(File relativeFile,
String funnyName)
throws IOException,
InvalidPackageException
IOException
InvalidPackageException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||