|
|||||||||
| 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.SmodelsWrapperTest
public class SmodelsWrapperTest
Contains tests of the SmodelsWrapper class.
SmodelsWrapper| Field Summary | |
|---|---|
private SmodelsWrapper |
sw
The SmodelsWrapper instance used in the tests. |
| Constructor Summary | |
|---|---|
SmodelsWrapperTest(String testName)
A default test case constructor. |
|
| Method Summary | |
|---|---|
void |
testSetModelLimit()
Tests the SmodelsWrapper.setModelLimit(int) and
SmodelsWrapper.exec() methods—sets a maximum model count
limit and a simple input string and tests if the correct output is
produced by smodels. |
void |
testSetSmodelsPath()
Tests the SmodelsWrapper.setSmodelsPath(String) method. |
void |
testSimpleInput()
Tests the SmodelsWrapper.exec() method—sets a simple input
string and tests if the correct output is produced by smodels. |
| 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 final SmodelsWrapper sw
SmodelsWrapper instance used in the tests.
| Constructor Detail |
|---|
public SmodelsWrapperTest(String testName)
testName - the name of the test case| Method Detail |
|---|
public void testSetSmodelsPath()
throws IOException
SmodelsWrapper.setSmodelsPath(String) method.
IOException
public void testSimpleInput()
throws IOException
SmodelsWrapper.exec() method—sets a simple input
string and tests if the correct output is produced by smodels.
This test can only pass if the smodels binary can be executed by issuing
a simple "smodels" command.
WrapperException - if an IOException occurs while creating
the process or if an InterruptedException occurs while waiting
for the process instance to finish execution.
IOException - if an I/O error occurs while setting its standard
input or while reading the output of the process (should never happen)
public void testSetModelLimit()
throws IOException
SmodelsWrapper.setModelLimit(int) and
SmodelsWrapper.exec() methods—sets a maximum model count
limit and a simple input string and tests if the correct output is
produced by smodels.
This test can only pass if the smodels binary can be executed by issuing
a simple "smodels" command.
WrapperException - if an IOException occurs while creating
the process or if an InterruptedException occurs while waiting
for the process instance to finish execution.
IOException - if an I/O error occurs while setting its standard
input or while reading the output of the process (should never happen)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||