Package org.camunda.bpm.engine.filter

Examples of org.camunda.bpm.engine.filter.Filter


  @Test
  public void testGetFilterWithCandidateUserQuery() {
    TaskQueryImpl query = new TaskQueryImpl();
    query.taskCandidateUser("abc");
    Filter filter = new FilterEntity("Task").setName("test").setQuery(query);
    when(filterServiceMock.getFilter(EXAMPLE_FILTER_ID)).thenReturn(filter);

    given()
      .pathParam("id", EXAMPLE_FILTER_ID)
    .then().expect()
View Full Code Here


  @Test
  public void testGetFilterWithFollowUpBeforeOrNotExistentExpression() {
    TaskQueryImpl query = new TaskQueryImpl();
    query.followUpBeforeOrNotExistentExpression("#{now()}");
    Filter filter = new FilterEntity("Task").setName("test").setQuery(query);
    when(filterServiceMock.getFilter(EXAMPLE_FILTER_ID)).thenReturn(filter);

    given()
      .pathParam("id", EXAMPLE_FILTER_ID)
    .then().expect()
View Full Code Here

  @Test
  public void testHalTaskQueryWithWrongFormatVariablesProperties() {
    // mock properties with variable name list in wrong format
    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put("variables", "foo");
    Filter filter =  mockFilter().properties(properties).build();
    when(filterServiceMock.getFilter(eq(EXAMPLE_FILTER_ID))).thenReturn(filter);

    given()
      .pathParam("id", EXAMPLE_FILTER_ID)
      .header(ACCEPT_HAL_HEADER)
View Full Code Here

  @Test
  public void testHalTaskQueryWithEmptyVariablesProperties() {
    // mock properties with variable name list in wrong format
    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put("variables", Collections.emptyList());
    Filter filter =  mockFilter().properties(properties).build();
    when(filterServiceMock.getFilter(eq(EXAMPLE_FILTER_ID))).thenReturn(filter);

    given()
      .pathParam("id", EXAMPLE_FILTER_ID)
      .header(ACCEPT_HAL_HEADER)
View Full Code Here

    variables.add(bar);

    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put("variables", variables);

    Filter filter = mockFilter().properties(properties).build();
    when(filterServiceMock.getFilter(eq(EXAMPLE_FILTER_ID))).thenReturn(filter);

    return filter;
  }
View Full Code Here

    return this;
  }

  @SuppressWarnings("unchecked")
  public Filter build() {
    Filter filter = mock(Filter.class);
    when(filter.getId()).thenReturn(id);
    when(filter.getResourceType()).thenReturn(resourceType);
    when(filter.getName()).thenReturn(name);
    when(filter.getOwner()).thenReturn(owner);
    when(filter.getQuery()).thenReturn(query);
    when(filter.getProperties()).thenReturn(properties);
    return filter;
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.filter.Filter

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.