git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[utils]
/
test
/
enterprise
/
src
/
test
/
java
/
org
/
wamblee
/
support
/
jndi
/
StubInitiaContextFactoryTest.java
diff --git
a/test/enterprise/src/test/java/org/wamblee/support/jndi/StubInitiaContextFactoryTest.java
b/test/enterprise/src/test/java/org/wamblee/support/jndi/StubInitiaContextFactoryTest.java
index b4745bd1a22eac90a09d99978ab99de98613c547..f6a5781042fd68d2b32f9f086ce54d6d60ec10e4 100644
(file)
--- a/
test/enterprise/src/test/java/org/wamblee/support/jndi/StubInitiaContextFactoryTest.java
+++ b/
test/enterprise/src/test/java/org/wamblee/support/jndi/StubInitiaContextFactoryTest.java
@@
-15,15
+15,15
@@
*/
package org.wamblee.support.jndi;
*/
package org.wamblee.support.jndi;
-import static junit.framework.Assert.
assertEquals
;
+import static junit.framework.Assert.
*
;
import javax.naming.InitialContext;
import javax.naming.InitialContext;
+import javax.naming.NameNotFoundException;
import javax.naming.NamingException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import javax.naming.NamingException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.wamblee.support.jndi.StubInitialContextFactory;
public class StubInitiaContextFactoryTest {
public class StubInitiaContextFactoryTest {
@@
-52,4
+52,11
@@
public class StubInitiaContextFactoryTest {
assertEquals("hallo", obj);
}
assertEquals("hallo", obj);
}
+ @Test(expected = NameNotFoundException.class)
+ public void testLookupFails() throws Exception {
+ StubInitialContextFactory.register();
+
+ InitialContext ctx = new InitialContext();
+ Object obj = ctx.lookup("a/b");
+ }
}
}