X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=test%2Fenterprise%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Ftest%2Fjndi%2FStubInitiaContextFactoryTest.java;h=1960dac24231169de1e5dd5a158048ea17986011;hb=83898516d61bfcd1f4e3a3ea79bb56f3877f4900;hp=a0ae2d83f6cbc8bab9b7ac61b3c164bf6effb717;hpb=a1ab1a2e44c95cc10ad4c4d15420b49e3744d93b;p=utils diff --git a/test/enterprise/src/test/java/org/wamblee/test/jndi/StubInitiaContextFactoryTest.java b/test/enterprise/src/test/java/org/wamblee/test/jndi/StubInitiaContextFactoryTest.java index a0ae2d83..1960dac2 100644 --- a/test/enterprise/src/test/java/org/wamblee/test/jndi/StubInitiaContextFactoryTest.java +++ b/test/enterprise/src/test/java/org/wamblee/test/jndi/StubInitiaContextFactoryTest.java @@ -12,7 +12,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ package org.wamblee.test.jndi; import static junit.framework.Assert.*; @@ -42,7 +42,7 @@ public class StubInitiaContextFactoryTest { InitialContext ctx = new InitialContext(); ctx.bind(JNDI_NAME, "hallo"); } - + // String based lookups. @Test @@ -57,15 +57,15 @@ public class StubInitiaContextFactoryTest { assertEquals("hallo", obj); } - + @Test(expected = NameNotFoundException.class) - public void testUnbind() throws Exception { - testLookup(); - InitialContext ctx = new InitialContext(); + public void testUnbind() throws Exception { + testLookup(); + InitialContext ctx = new InitialContext(); ctx.unbind(JNDI_NAME); ctx = new InitialContext(); ctx.lookup(JNDI_NAME); - + } @Test(expected = NameNotFoundException.class) @@ -73,11 +73,11 @@ public class StubInitiaContextFactoryTest { StubInitialContextFactory.register(); InitialContext ctx = new InitialContext(); - Object obj = ctx.lookup(JNDI_NAME); + ctx.lookup(JNDI_NAME); } - + // Name based lookups - + @Test public void testLookupName() throws Exception { StubInitialContextFactory.register(); @@ -90,11 +90,11 @@ public class StubInitiaContextFactoryTest { assertEquals("hallo", obj); } - + @Test(expected = NameNotFoundException.class) - public void testUnbindName() throws Exception { - testLookup(); - InitialContext ctx = new InitialContext(); + public void testUnbindName() throws Exception { + testLookup(); + InitialContext ctx = new InitialContext(); ctx.unbind(new CompositeName(JNDI_NAME)); ctx = new InitialContext(); ctx.lookup(new CompositeName(JNDI_NAME)); @@ -105,6 +105,6 @@ public class StubInitiaContextFactoryTest { StubInitialContextFactory.register(); InitialContext ctx = new InitialContext(); - Object obj = ctx.lookup(JNDI_NAME); + ctx.lookup(JNDI_NAME); } }