|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
lp.wrap.WrapperUtilsTest
public class WrapperUtilsTest
Contains tests of the WrapperUtils class.
WrapperUtils| Field Summary | |
|---|---|
private static char |
SEP
A shortcut name for File.separatorChar. |
private static WrapperUtils |
WU
The singleton instance of WrapperUtils |
| Constructor Summary | |
|---|---|
WrapperUtilsTest(String testName)
A default test case constructor. |
|
| Method Summary | |
|---|---|
void |
testDumpToString()
Tests of the WrapperUtils.dumpToString(InputStream) method. |
void |
testExec()
Tests of the WrapperUtils.exec(String) method. |
void |
testGetCommandName()
Tests of the WrapperUtils.getCommandName(String) method. |
void |
testGetShortCommandName()
Tests of the WrapperUtils.getShortCommandName(String) method. |
void |
testTransfer1()
Tests of the WrapperUtils.transfer(InputStream, OutputStream)
method. |
void |
testTransfer2()
Tests of the WrapperUtils.transfer(String, OutputStream)
method. |
void |
testTransfer3()
Tests of the WrapperUtils.transfer(InputStream, StringBuilder)
method. |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final char SEP
File.separatorChar.
private static final WrapperUtils WU
WrapperUtils
| Constructor Detail |
|---|
public WrapperUtilsTest(String testName)
testName - the name of the test case| Method Detail |
|---|
public void testGetCommandName()
WrapperUtils.getCommandName(String) method.
public void testGetShortCommandName()
WrapperUtils.getShortCommandName(String) method.
public void testTransfer1()
throws IOException
WrapperUtils.transfer(InputStream, OutputStream)
method.
IOException - if an I/O error occurs while running the tests
(should never happen)
public void testTransfer2()
throws IOException
WrapperUtils.transfer(String, OutputStream)
method.
IOException - if an I/O error occurs while running the tests
(should never happen)
public void testTransfer3()
throws IOException
WrapperUtils.transfer(InputStream, StringBuilder)
method.
IOException - if an I/O error occurs while running the tests
(should never happen)
public void testDumpToString()
throws IOException
WrapperUtils.dumpToString(InputStream) method.
IOException - if an I/O error occurs while running the tests
(should never happen)
public void testExec()
throws WrapperException,
InterruptedException,
IOException
WrapperUtils.exec(String) method.
WrapperException - if an IOException occurs while
running the tests (should never happen)
InterruptedException - if an error occurs while waiting for the
Process with the "cat" command to finish execution
IOException - if an I/O error occurs while closing the standard
input of the process
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||