Package speculoos.config.xml

Examples of speculoos.config.xml.XMLConfigurator


   *
   * @throws MapperConfigurationException
   */
  public void test07ErrorInMapInheritance()
      throws MapperConfigurationException {
    XMLConfigurator xc = new XMLConfigurator();
    try {
      xc.parse(Thread.currentThread().getContextClassLoader()
          .getResourceAsStream("jndi-sample-error-1.xml"));
      fail("Should have thrown exception");
    } catch (XMLConfiguratorException e) {
    }
  }
View Full Code Here


   *
   * @throws MapperConfigurationException
   */
  public void test08ErrorInMapInheritanceForwardDeclaration()
      throws MapperConfigurationException {
    XMLConfigurator xc = new XMLConfigurator();
    try {
      xc.parse(Thread.currentThread().getContextClassLoader()
          .getResourceAsStream("jndi-sample-error-2.xml"));
      fail("Should have thrown exception");
    } catch (XMLConfiguratorException e) {
    }
  }
View Full Code Here

   *
   * @throws MapperConfigurationException
   */
  public void test09ErroUnknownMapReference()
      throws MapperConfigurationException {
    XMLConfigurator xc = new XMLConfigurator();
    try {
      xc.parse(Thread.currentThread().getContextClassLoader()
          .getResourceAsStream("jndi-sample-error-3.xml"));
      fail("Should have thrown exception");
    } catch (XMLConfiguratorException e) {
    }
  }
View Full Code Here

   * Uknown tag in JNDI configuration
   *
   * @throws MapperConfigurationException
   */
  public void test10UndefinedHandler() throws MapperConfigurationException {
    XMLConfigurator xc = new XMLConfigurator();
    try {
      xc.parse(Thread.currentThread().getContextClassLoader()
          .getResourceAsStream("jndi-sample-error-4.xml"));
      fail("Should have thrown exception");
    } catch (XMLConfiguratorException e) {
    }
  }
View Full Code Here

   * Unknown op code in modify operation
   *
   * @throws MapperConfigurationException
   */
  public void test11UnknownOpCode() throws MapperConfigurationException {
    XMLConfigurator xc = new XMLConfigurator();
    try {
      xc.parse(Thread.currentThread().getContextClassLoader()
          .getResourceAsStream("jndi-sample-error-5.xml"));
      fail("Should have thrown exception");
    } catch (XMLConfiguratorException e) {
    }
  }
View Full Code Here

   *
   * @throws MapperConfigurationException
   */
  public void test12UnknownSearchControlsProperty()
      throws MapperConfigurationException {
    XMLConfigurator xc = new XMLConfigurator();
    try {
      xc.parse(Thread.currentThread().getContextClassLoader()
          .getResourceAsStream("jndi-sample-error-6.xml"));
      fail("Should have thrown exception");
    } catch (XMLConfiguratorException e) {
    }
  }
View Full Code Here

  /**
   * Forbid declaration of two maps with same name
   *
   */
  public void test13DoubleMapDeclaration() {
    XMLConfigurator xc = new XMLConfigurator();
    try {
      xc.parse(Thread.currentThread().getContextClassLoader()
          .getResourceAsStream("jndi-sample-error-7.xml"));
      fail("duplicate map name : Should have thrown exception");
    } catch (XMLConfiguratorException e) {
    }
  }
View Full Code Here

  /**
   * Forbid declaration of two sources with same name
   *
   */
  public void test14DoubleSourceDeclaration() {
    XMLConfigurator xc = new XMLConfigurator();
    try {
      xc.parse(Thread.currentThread().getContextClassLoader()
          .getResourceAsStream("jndi-sample-error-8.xml"));
      fail("duplicate source name : Should have thrown exception");
    } catch (XMLConfiguratorException e) {
    }
  }
View Full Code Here

  /**
   * Forbid declaration of two mappers with same name
   *
   */
  public void test15DoubleMapperDeclaration() {
    XMLConfigurator xc = new XMLConfigurator();
    try {
      xc.parse(Thread.currentThread().getContextClassLoader()
          .getResourceAsStream("jndi-sample-error-9.xml"));
      fail("duplicate mapper name : Should have thrown exception");
    } catch (XMLConfiguratorException e) {
    }
  }
View Full Code Here

  }
 

  public void test16Bean()
      throws MapperConfigurationException, XMLConfiguratorException {
    XMLConfigurator xc = new XMLConfigurator();
    xc.parse(Thread.currentThread().getContextClassLoader()
        .getResourceAsStream("jndi-sample-bean.xml"));
    // expects
    mockconfigure.expects(once()).method("addParameter").with(
        eq("ldifsource"), eq("canam.ldif"));
    mockconfigure.expects(once()).method("addSource").with(
        eq("ldifsource"), ANYTHING);
    mockconfigure.expects(once()).method("addMapper").with(eq("addEmp"),
        ANYTHING);
    mockconfigure.expects(once()).method("addMapper").with(eq("delEmp"),
        ANYTHING);
    mockconfigure.expects(once()).method("link").with(eq("addEmp"),
        eq("ldifsource"));
    mockconfigure.expects(once()).method("link").with(eq("delEmp"),
        eq("ldifsource"));
    // configure
    xc.configure((Configure) mockconfigure.proxy());
  }
View Full Code Here

TOP

Related Classes of speculoos.config.xml.XMLConfigurator

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.