Package org.springframework.tests.mock.jndi

Examples of org.springframework.tests.mock.jndi.SimpleNamingContext


    assertThat(ps.getProperty("bogus"), nullValue());
  }

  @Test
  public void nameBoundWithoutPrefix() {
    final SimpleNamingContext context = new SimpleNamingContext();
    context.bind("p1", "v1");

    JndiTemplate jndiTemplate = new JndiTemplate() {
      @Override
      protected Context createInitialContext() throws NamingException {
        return context;
View Full Code Here


    assertThat((String)ps.getProperty("p1"), equalTo("v1"));
  }

  @Test
  public void nameBoundWithPrefix() {
    final SimpleNamingContext context = new SimpleNamingContext();
    context.bind("java:comp/env/p1", "v1");

    JndiTemplate jndiTemplate = new JndiTemplate() {
      @Override
      protected Context createInitialContext() throws NamingException {
        return context;
View Full Code Here

TOP

Related Classes of org.springframework.tests.mock.jndi.SimpleNamingContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.