org.jcrontab.data.tests
Class DAOTest
java.lang.Object
TestCase
org.jcrontab.data.tests.DAOTest
- public class DAOTest
- extends TestCase
In order to run this test you need a void Database and GenericSQL DataSource
- See Also:
- Serialized Form
Method Summary |
static void |
main(String[] args)
|
protected void |
setUp()
|
static Test |
suite()
|
void |
testAdd()
|
void |
testFind0()
|
void |
testFind1()
|
void |
testFind2()
|
void |
testFindAll()
|
void |
testRemove1()
public void testRemove() throws Exception {
CrontabEntryDAO.getInstance().remove(ceb);
try {
CrontabEntryBean[] ceb3 = CrontabEntryDAO.getInstance().findAll();
} catch (DataNotFoundException dnfe) {
assertEquals(dnfe.toString(), "org.jcrontab.data.DataNotFoundException: "
+ "No CrontabEntries available");
}
} |
void |
testRemove2()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DAOTest
public DAOTest(String name)
setUp
protected void setUp()
throws Exception
- Throws:
Exception
suite
public static Test suite()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
testAdd
public void testAdd()
throws Exception
- Throws:
Exception
testFind0
public void testFind0()
throws Exception
- Throws:
Exception
testFind1
public void testFind1()
throws Exception
- Throws:
Exception
testFind2
public void testFind2()
throws Exception
- Throws:
Exception
testFindAll
public void testFindAll()
throws Exception
- Throws:
Exception
testRemove1
public void testRemove1()
throws Exception
- public void testRemove() throws Exception {
CrontabEntryDAO.getInstance().remove(ceb);
try {
CrontabEntryBean[] ceb3 = CrontabEntryDAO.getInstance().findAll();
} catch (DataNotFoundException dnfe) {
assertEquals(dnfe.toString(), "org.jcrontab.data.DataNotFoundException: "
+ "No CrontabEntries available");
}
}
- Throws:
Exception
testRemove2
public void testRemove2()
throws Exception
- Throws:
Exception