|
||||||||||
| 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 java.io.File |
f1
Files that exist, and the filenames that represent them. |
private java.lang.String |
f1_contents
|
private java.lang.String |
f1_name
|
private java.io.File |
f2
|
private java.lang.String |
f2_contents
|
private java.lang.String |
f2_name
|
private java.io.File |
f3
|
private java.lang.String |
f3_contents
|
private java.lang.String |
f3_name
|
private java.io.File |
f4
|
private java.lang.String |
f4_contents
|
private java.lang.String |
f4_name
|
private java.io.File |
f5
|
private java.lang.String |
f5_contents
|
private java.lang.String |
f5_name
|
private java.io.File |
f6
|
private java.lang.String |
f6_contents
|
private java.lang.String |
f6_name
|
private java.io.File |
f7
|
private java.lang.String |
f7_contents
|
private java.lang.String |
f7_name
|
private java.io.File |
f8
|
private java.lang.String |
f8_contents
|
private java.lang.String |
f8_name
|
private static char |
FS
File separator, i.e. |
private java.io.File |
nof1
Files that do not exist (constructor deletes them), and their filenames. |
private java.lang.String |
nof1_name
|
private java.io.File |
nof2
|
private java.lang.String |
nof2_name
|
private java.io.File |
nof3
|
private java.lang.String |
nof3_name
|
private java.io.File |
nof4
|
private java.lang.String |
nof4_name
|
private java.io.File |
nof5
|
private java.lang.String |
nof5_name
|
| Constructor Summary | |
|---|---|
CommandLineTest(java.lang.String name)
Constructor. |
|
| Method Summary | |
|---|---|
private void |
checkFile(java.io.File relativeFile,
java.lang.String funnyName)
Helper for testRelativeFile and testDotPaths. |
private java.io.File |
mkTempDir(java.lang.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 java.io.File f1
private volatile java.lang.String f1_name
private volatile java.lang.String f1_contents
private volatile java.io.File f2
private volatile java.lang.String f2_name
private volatile java.lang.String f2_contents
private volatile java.io.File f3
private volatile java.lang.String f3_name
private volatile java.lang.String f3_contents
private volatile java.io.File f4
private volatile java.lang.String f4_name
private volatile java.lang.String f4_contents
private volatile java.io.File f5
private volatile java.lang.String f5_name
private volatile java.lang.String f5_contents
private volatile java.io.File f6
private volatile java.lang.String f6_name
private volatile java.lang.String f6_contents
private volatile java.io.File f7
private volatile java.lang.String f7_name
private volatile java.lang.String f7_contents
private volatile java.io.File f8
private volatile java.lang.String f8_name
private volatile java.lang.String f8_contents
private volatile java.io.File nof1
private volatile java.io.File nof2
private volatile java.io.File nof3
private volatile java.io.File nof4
private volatile java.io.File nof5
private volatile java.lang.String nof1_name
private volatile java.lang.String nof2_name
private volatile java.lang.String nof3_name
private volatile java.lang.String nof4_name
private volatile java.lang.String nof5_name
private Log _log
| Constructor Detail |
|---|
public CommandLineTest(java.lang.String name)
name - the name of the test case| Method Detail |
|---|
public void setUp()
throws java.lang.Exception
DrJavaTestCase
setUp in class DrJavaTestCasejava.lang.Exception - This convention is mandated by JUnit.TestCase, the superclass of this class.
public void tearDown()
throws java.lang.Exception
DrJavaTestCase
tearDown in class DrJavaTestCasejava.lang.Exceptionpublic void testNone()
public void testOpenOne()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationExceptionpublic void testNE()
public void testOpenMany()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
public void testMixed()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
public void testDups()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
public void testRelativePath()
throws java.io.IOException,
InvalidPackageException
java.io.IOException
InvalidPackageExceptionpublic void testDotPaths()
private java.io.File mkTempDir(java.lang.String funnyName)
private void checkFile(java.io.File relativeFile,
java.lang.String funnyName)
throws java.io.IOException,
InvalidPackageException
java.io.IOException
InvalidPackageException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||