Package speculoos.utils

Examples of speculoos.utils.VariableString


    Map genv = new HashMap();
    genv.put("toto", "toto");
    genv.put("titi", "titi");
    /* add mapper */
    SearchMapperImpl smi = new SearchMapperImpl("search1");
    VariableString root = new VariableString("ou=Personnes");
    smi.setRoot(root);
    VariableString filter = new VariableString(
        "(fullName=${self.name} ${self.surname})");
    smi.getInputChain().addMapper(new StringVariable("filter", filter));
    smi.setTypeHelper(new TypeHelper());
      src.add("search1", smi);
    src.start(genv);
View Full Code Here


    Map genv = new HashMap();
    genv.put("toto", "toto");
    genv.put("titi", "titi");
    /* add mapper */
    SearchMapperImpl smi = new SearchMapperImpl("search1");
    VariableString root = new VariableString("ou=Personnes");
    smi.setRoot(root);
    VariableString filter = new VariableString(
        "(fullName=${self.name} ${self.surname})");
    smi.getInputChain().addMapper(new StringVariable("filter", filter));
    smi.setTypeHelper(new TypeHelper());
      src.add("search1", smi);
    src.start(genv);
View Full Code Here

    env = new HashMap();
    env.put("id", "ut061111");
    /* configure source */
    /* configure mapper */
    ami = new DeleteMapperImpl();
    root = new VariableString(rootstr);
    /* expectations */
    cn = new CompoundName(root.instance(env), Constants.SYNTAX);
    npmock.expects(once()).method("parse").with(
        eq("cn=ut061111,ou=Personnes,o=canam")).will(returnValue(cn));
    ami.setRoot(root);
View Full Code Here

    env.put("orga", "Personnes");
    env.put("pid", "toto");
    env.put("id", "tutu");
    /* configure mapper */
    RenameMapperImpl smi = new RenameMapperImpl();
    this.root = new VariableString(rootstr);
    /* expectations */
    this.cn = new CompoundName(root.instance(env), Constants.SYNTAX);
    this.newn = new CompoundName(root.instance(env), Constants.SYNTAX);

    npmock.expects(once()).method("parse").with(eq("cn=tutu")).will(
View Full Code Here

   */
  public void test01Rename() throws MapperException {
    ctxmock.expects(once()).method("rename").with(same(cn), same(newn));
    /* input */
    /* operations */
    sm.getInputChain().addMapper(new StringVariable("newRDN",new VariableString("cn=${id}")));
    sm.rename(null, env);
  }
View Full Code Here

    /* input */
    Map input = new HashMap();
    input.put("id", "tutu");
    input.put("pid", "toto");
    /* operations */
    sm.getInputChain().addMapper(new StringVariable("newRDN",new VariableString("cn=${id}")));
    try {
      sm.rename(null,input);
      fail("Should have thrown MapperException");
    } catch (MapperException e) {
      // OK
View Full Code Here

    /* input */
    Map input = new HashMap();
    input.put("id", "tutu");
    input.put("pid", "toto");
    /* operations */
    sm.getInputChain().addMapper(new StringVariable("newRDN",new VariableString("cn=${id}")));
    sm.map(null,input);
  }
View Full Code Here

    npmock.expects(once()).method("parse").with(eq("cn=tutu")).will(
        throwException(new NamingException("Invalid name")));
    npmock.expects(once()).method("parse").with(eq("cn=toto")).will(
        returnValue(cn));
    try {
      sm.getInputChain().addMapper(new StringVariable("newRDN",new VariableString("cn=${id}")));
sm.map(input, lenv);
      fail("Should have thrown exception");
    } catch (MapperException e) {
    }
  }
View Full Code Here

    env = new HashMap();
    env.put("id","ut061111");
    /* configure source */
    /* configure mapper */
    ami = new AddMapperImpl();
    root = new VariableString(rootstr);
    /* expectations */
    cn = new CompoundName(root.instance(env), Constants.SYNTAX);
    npmock.expects(once()).method("parse").with(
        eq("cn=ut061111,ou=Personnes,o=canam")).will(returnValue(cn));
    ami.setRoot(root);
View Full Code Here

    /* configure source */
    env.put("orga", "Personnes");
    env.put("pid", "toto");
    /* configure mapper */
    CompareMapperImpl smi = new CompareMapperImpl();
    this.root = new VariableString(rootstr);
    /* expectations */
    this.cn = new CompoundName(root.instance(env), Constants.SYNTAX);
    npmock.expects(once()).method("parse").with(eq("cn=toto")).will(
        returnValue(cn));
    smi.setRoot(root);
View Full Code Here

TOP

Related Classes of speculoos.utils.VariableString

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.