Package speculoos

Examples of speculoos.Personne


   * @throws MapperException
   *
   */
  public void test03MultipleResult() throws MapperException {
    /* populate input */
    Personne input = new Personne();
    input.setName("NAQUIN");
    input.setSurname("thiery");
    NamingEnumeration enu = _answer03();
    ctxmock.expects(once()).method("search").with(eq(cn),
        eq("fullName=NAQUIN thiery"), ANYTHING).will(returnValue(enu));
    List ret = sm.search(input, null);
    assertEquals("Return list should contain two elements", 2, ret.size());
View Full Code Here


   * @throws InvalidNameException
   * @throws MapperException
   */
  public void test04LocalEnv() throws InvalidNameException, MapperException {
    /* populate input */
    Personne input = new Personne();
    input.setName("NAQUIN");
    input.setSurname("thiery");
    Map lenv = new HashMap();
    lenv.put("orga", "Monorga");
    this.cn = new CompoundName("ou=Monorga,o=canam", Constants.SYNTAX);
    npmock.reset();
    npmock.expects(once()).method("parse").with(eq("ou=Monorga,o=canam"))
View Full Code Here

   * @return
   * @throws MapperException
   */
  public void test05ControlCountLimit() throws MapperException {
    /* populate input */
    Personne input = new Personne();
    input.setName("NAQUIN");
    input.setSurname("thiery");
    Map lenv = new HashMap();
    lenv.put("maxEnreg", "10");
    StringVariable flt = new StringVariable("countLimit",
        new VariableString("${maxEnreg}"));
    sm.getInputChain().addMapper(flt);
View Full Code Here

   * @return
   * @throws MapperException
   */
  public void test06ControlTimeLimit() throws MapperException {
    /* populate input */
    Personne input = new Personne();
    input.setName("NAQUIN");
    input.setSurname("thiery");
    Map lenv = new HashMap();
    lenv.put("maxTime", "12");
    StringVariable flt = new StringVariable("timeLimit",
        new VariableString("${maxTime}"));
    sm.getInputChain().addMapper(flt);
View Full Code Here

   *
   * @throws MapperException
   */
  public void test07ControlScope() throws MapperException {
    /* populate input */
    Personne input = new Personne();
    input.setName("NAQUIN");
    input.setSurname("thiery");
    Map lenv = new HashMap();
    lenv.put("scope", "2");
    StringVariable flt = new StringVariable("searchScope",
        new VariableString("${scope}"));
    sm.getInputChain().addMapper(flt);
View Full Code Here

    SearchMapperImpl sm = (SearchMapperImpl) src.create("search1", genv);
    Map h = new HashMap();
    h.put("name","name");
    h.put("surname","surname");
    /* populate input */
    Personne input = new Personne();
    input.setName("NAQUIN");
    input.setSurname("thiery");
    sm.setOutput(Personne.class,h);
    sm.map(input, null);
    src.release(sm);
    try {
      src.release(sm);
View Full Code Here

            returnValue(enu));
    List ret = sm.search(input, lenv);
  }

  public void test08RootNameError() {
    Personne input = new Personne();
    input.setName("NAQUIN");
    input.setSurname("thiery");
    Map lenv = new HashMap();
    lenv.put("scope", "2");
    npmock.reset();
    npmock.expects(once()).method("parse").with(eq("ou=Personnes,o=canam"))
        .will(throwException(new NamingException("Invalid name")));
View Full Code Here

    SearchMapperImpl sm = (SearchMapperImpl) src.create("search1", genv);
    /* populate input */
    Map h = new HashMap();
    h.put("name","name");
    h.put("surname","surname");
    Personne input = new Personne();
    input.setName("NAQUIN");
    input.setSurname("thiery");
    sm.setOutput(Personne.class,h);
    sm.map(input, null);
    src.release(sm);
    try {
      input.setSurname("thiery");
        sm.map(input, null);
      fail("Map should fail after  releases");
    } catch (Exception e) {
    }

View Full Code Here

  }

  public void test11SearchError() {
    /* populate input */
    Exception e1 = null;
    Personne input = new Personne();
    input.setName("NAQUIN");
    input.setSurname("thiery");
    NamingEnumeration enu = _answer01();
    ctxmock.expects(once()).method("search").with(eq(cn),
        eq("fullName=NAQUIN thiery"), ANYTHING).will(
        throwException(e1 = new NamingException("exception")));
    try {
View Full Code Here

  }

  public void test12GenericMap() throws MapperException {
    /* populate input */
    Personne input = new Personne();
    input.setName("NAQUIN");
    input.setSurname("thiery");
    NamingEnumeration enu = _answer01();
    ctxmock.expects(once()).method("search").with(eq(cn),
        eq("fullName=NAQUIN thiery"), ANYTHING).will(returnValue(enu));
    List ret = (List) sm.map(input, null);
    assertEquals("Return list should contain one element", 1, ret.size());
View Full Code Here

TOP

Related Classes of speculoos.Personne

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.