Package org.camunda.bpm.engine.identity

Examples of org.camunda.bpm.engine.identity.UserQuery


    query = identityService.createUserQuery().userFirstNameLike("Ker%");
    verifyQueryResults(query, 1);
  }

  public void testQueryByInvalidFirstNameLike() {
    UserQuery query = identityService.createUserQuery().userFirstNameLike("%mispiggy%");
    verifyQueryResults(query, 0);

    try {
      identityService.createUserQuery().userFirstNameLike(null).singleResult();
      fail();
View Full Code Here


      fail();
    } catch (ProcessEngineException e) { }
  }

  public void testQueryByLastName() {
    UserQuery query = identityService.createUserQuery().userLastName("Bear");
    verifyQueryResults(query, 1);

    User result = query.singleResult();
    assertEquals("fozzie", result.getId());
  }
View Full Code Here

    User result = query.singleResult();
    assertEquals("fozzie", result.getId());
  }

  public void testQueryByInvalidLastName() {
    UserQuery query = identityService.createUserQuery().userLastName("invalid");
    verifyQueryResults(query, 0);

    try {
      identityService.createUserQuery().userLastName(null).singleResult();
      fail();
View Full Code Here

      fail();
    } catch (ProcessEngineException e) { }
  }

  public void testQueryByLastNameLike() {
    UserQuery query = identityService.createUserQuery().userLastNameLike("%rog%");
    verifyQueryResults(query, 1);

    query = identityService.createUserQuery().userLastNameLike("%ea%");
    verifyQueryResults(query, 2);
  }
View Full Code Here

    query = identityService.createUserQuery().userLastNameLike("%ea%");
    verifyQueryResults(query, 2);
  }

  public void testQueryByInvalidLastNameLike() {
    UserQuery query = identityService.createUserQuery().userLastNameLike("%invalid%");
    verifyQueryResults(query, 0);

    try {
      identityService.createUserQuery().userLastNameLike(null).singleResult();
      fail();
View Full Code Here

      fail();
    } catch (ProcessEngineException e) { }
  }

  public void testQueryByEmail() {
    UserQuery query = identityService.createUserQuery().userEmail("kermit@muppetshow.com");
    verifyQueryResults(query, 1);
  }
View Full Code Here

    UserQuery query = identityService.createUserQuery().userEmail("kermit@muppetshow.com");
    verifyQueryResults(query, 1);
  }

  public void testQueryByInvalidEmail() {
    UserQuery query = identityService.createUserQuery().userEmail("invalid");
    verifyQueryResults(query, 0);

    try {
      identityService.createUserQuery().userEmail(null).singleResult();
      fail();
View Full Code Here

      fail();
    } catch (ProcessEngineException e) { }
  }

  public void testQueryByEmailLike() {
    UserQuery query = identityService.createUserQuery().userEmailLike("%muppetshow.com");
    verifyQueryResults(query, 3);

    query = identityService.createUserQuery().userEmailLike("%kermit%");
    verifyQueryResults(query, 1);
  }
View Full Code Here

    query = identityService.createUserQuery().userEmailLike("%kermit%");
    verifyQueryResults(query, 1);
  }

  public void testQueryByInvalidEmailLike() {
    UserQuery query = identityService.createUserQuery().userEmailLike("%invalid%");
    verifyQueryResults(query, 0);

    try {
      identityService.createUserQuery().userEmailLike(null).singleResult();
      fail();
View Full Code Here

    assertEquals(3, identityService.createUserQuery().orderByUserEmail().desc().count());
    assertEquals(3, identityService.createUserQuery().orderByUserFirstName().desc().count());
    assertEquals(3, identityService.createUserQuery().orderByUserLastName().desc().count());

    // Combined with criteria
    UserQuery query = identityService.createUserQuery().userLastNameLike("%ea%").orderByUserFirstName().asc();
    List<User> users = query.list();
    assertEquals(2,users.size());
    assertEquals("Fozzie", users.get(0).getFirstName());
    assertEquals("Gonzo", users.get(1).getFirstName());
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.identity.UserQuery

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.