|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase net.sourceforge.sqlunit.test.ContextTest
public class ContextTest
Test to check generation of MockInitialContext by MockInitialContextFactory which gets a MockDataSource hard-bound into it, and which is then looked up using context.lookup(). The code in the test mimics the way a client would initialize a InitialContext from a JNDI name server, and retrieve a DataSource object by name. This is to mock tests for the JNDI way of getting a Connection for SQLUnit.
Constructor Summary | |
---|---|
ContextTest(java.lang.String name)
Boilerplate constructor. |
Method Summary | |
---|---|
static void |
main(java.lang.String[] argv)
Boilerplate main method. |
static junit.framework.Test |
suite()
Boilerplate suite() method. |
void |
testMockJndiLookup()
Test to see if we get a valid Connection using a mock JNDI lookup. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, 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 |
Constructor Detail |
---|
public ContextTest(java.lang.String name)
name
- the name of this test class.Method Detail |
---|
public static void main(java.lang.String[] argv)
argv
- the arguments (none).public static junit.framework.Test suite()
public final void testMockJndiLookup() throws java.lang.Exception
java.lang.Exception
- if the test failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |