org.camunda.bpm.engine.test.assertions
Class TaskAssert

java.lang.Object
  extended by org.assertj.core.api.AbstractAssert<S,A>
      extended by org.camunda.bpm.engine.test.assertions.AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>
          extended by org.camunda.bpm.engine.test.assertions.TaskAssert
All Implemented Interfaces:
org.assertj.core.api.Assert<TaskAssert,org.camunda.bpm.engine.task.Task>, org.assertj.core.api.Descriptable<TaskAssert>, org.assertj.core.api.ExtensionPoints<TaskAssert,org.camunda.bpm.engine.task.Task>

public class TaskAssert
extends AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

Assertions for a Task

Author:
Martin Schimak , Rafael Cordones

Field Summary
 
Fields inherited from class org.camunda.bpm.engine.test.assertions.AbstractProcessAssert
engine
 
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself
 
Constructor Summary
protected TaskAssert(org.camunda.bpm.engine.ProcessEngine engine, org.camunda.bpm.engine.task.Task actual)
           
 
Method Summary
protected static TaskAssert assertThat(org.camunda.bpm.engine.ProcessEngine engine, org.camunda.bpm.engine.task.Task actual)
           
protected  org.camunda.bpm.engine.runtime.ExecutionQuery executionQuery()
           
protected  org.camunda.bpm.engine.task.Task getCurrent()
           
 TaskAssert hasCandidateGroup(String candidateGroupId)
          Verifies the expectation that the Task is currently waiting to be assigned to a user of the specified candidate group.
 TaskAssert hasDefinitionKey(String taskDefinitionKey)
          Verifies the definition key of a Task.
 TaskAssert hasDescription(String description)
          Verifies the description of a Task.
 TaskAssert hasDueDate(Date dueDate)
          Verifies the due date of a Task.
 TaskAssert hasId(String id)
          Verifies the internal id of a Task.
 TaskAssert hasName(String name)
          Verifies the name (label) of a Task.
protected  org.camunda.bpm.engine.history.HistoricActivityInstanceQuery historicActivityInstanceQuery()
           
protected  org.camunda.bpm.engine.history.HistoricDetailQuery historicDetailQuery()
           
protected  org.camunda.bpm.engine.history.HistoricProcessInstanceQuery historicProcessInstanceQuery()
           
protected  org.camunda.bpm.engine.history.HistoricTaskInstanceQuery historicTaskInstanceQuery()
           
protected  org.camunda.bpm.engine.history.HistoricVariableInstanceQuery historicVariableInstanceQuery()
           
 TaskAssert isAssignedTo(String userId)
          Verifies the expectation that the Task is currently assigned to the specified user.
 TaskAssert isNotAssigned()
          Verifies the expectation that the Task is currently not assigned to any particular user.
protected  org.camunda.bpm.engine.runtime.JobQuery jobQuery()
           
protected  org.camunda.bpm.engine.repository.ProcessDefinitionQuery processDefinitionQuery()
           
protected  org.camunda.bpm.engine.runtime.ProcessInstanceQuery processInstanceQuery()
           
protected  org.camunda.bpm.engine.task.TaskQuery taskQuery()
           
protected  String toString(org.camunda.bpm.engine.task.Task task)
           
protected  org.camunda.bpm.engine.runtime.VariableInstanceQuery variableInstanceQuery()
           
 
Methods inherited from class org.camunda.bpm.engine.test.assertions.AbstractProcessAssert
authorizationService, formService, getActual, getExistingCurrent, getLastAssert, historyService, identityService, managementService, repositoryService, resetLastAsserts, runtimeService, taskService
 
Methods inherited from class org.assertj.core.api.AbstractAssert
as, as, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, overridingErrorMessage, usingComparator, usingDefaultComparator
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskAssert

protected TaskAssert(org.camunda.bpm.engine.ProcessEngine engine,
                     org.camunda.bpm.engine.task.Task actual)
Method Detail

assertThat

protected static TaskAssert assertThat(org.camunda.bpm.engine.ProcessEngine engine,
                                       org.camunda.bpm.engine.task.Task actual)

getCurrent

protected org.camunda.bpm.engine.task.Task getCurrent()
Specified by:
getCurrent in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

isNotAssigned

public TaskAssert isNotAssigned()
Verifies the expectation that the Task is currently not assigned to any particular user.

Returns:
this TaskAssert

isAssignedTo

public TaskAssert isAssignedTo(String userId)
Verifies the expectation that the Task is currently assigned to the specified user.

Parameters:
userId - id of the user the task should be currently assigned to.
Returns:
this TaskAssert

hasCandidateGroup

public TaskAssert hasCandidateGroup(String candidateGroupId)
Verifies the expectation that the Task is currently waiting to be assigned to a user of the specified candidate group.

Parameters:
candidateGroupId - id of the candidate group the task is assigned to
Returns:
this TaskAssert

hasDueDate

public TaskAssert hasDueDate(Date dueDate)
Verifies the due date of a Task.

Parameters:
dueDate - the date the task should be due at
Returns:
this TaskAssert

hasDefinitionKey

public TaskAssert hasDefinitionKey(String taskDefinitionKey)
Verifies the definition key of a Task. This key can be found in the <userTask id="myTaskDefinitionKey" .../> attribute of the process definition BPMN 2.0 XML file.

Parameters:
taskDefinitionKey - the expected value of the task/@id attribute
Returns:
this TaskAssert

hasId

public TaskAssert hasId(String id)
Verifies the internal id of a Task.

Parameters:
id - the expected value of the internal task id
Returns:
this TaskAssert

hasName

public TaskAssert hasName(String name)
Verifies the name (label) of a Task. This name can be found in the <userTask name="myName" .../> attribute of the process definition BPMN 2.0 XML file.

Parameters:
name - the expected value of the name
Returns:
this TaskAssert

hasDescription

public TaskAssert hasDescription(String description)
Verifies the description of a Task. This description can be found in the <userTask><documentation>description</documentation></userTask> element of the process definition BPMN 2.0 XML file.

Parameters:
description - the expected value of the description
Returns:
this TaskAssert

toString

protected String toString(org.camunda.bpm.engine.task.Task task)
Specified by:
toString in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

taskQuery

protected org.camunda.bpm.engine.task.TaskQuery taskQuery()
Overrides:
taskQuery in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

jobQuery

protected org.camunda.bpm.engine.runtime.JobQuery jobQuery()
Overrides:
jobQuery in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

processInstanceQuery

protected org.camunda.bpm.engine.runtime.ProcessInstanceQuery processInstanceQuery()
Overrides:
processInstanceQuery in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

executionQuery

protected org.camunda.bpm.engine.runtime.ExecutionQuery executionQuery()
Overrides:
executionQuery in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

variableInstanceQuery

protected org.camunda.bpm.engine.runtime.VariableInstanceQuery variableInstanceQuery()
Overrides:
variableInstanceQuery in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

historicActivityInstanceQuery

protected org.camunda.bpm.engine.history.HistoricActivityInstanceQuery historicActivityInstanceQuery()
Overrides:
historicActivityInstanceQuery in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

historicDetailQuery

protected org.camunda.bpm.engine.history.HistoricDetailQuery historicDetailQuery()
Overrides:
historicDetailQuery in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

historicProcessInstanceQuery

protected org.camunda.bpm.engine.history.HistoricProcessInstanceQuery historicProcessInstanceQuery()
Overrides:
historicProcessInstanceQuery in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

historicTaskInstanceQuery

protected org.camunda.bpm.engine.history.HistoricTaskInstanceQuery historicTaskInstanceQuery()
Overrides:
historicTaskInstanceQuery in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

historicVariableInstanceQuery

protected org.camunda.bpm.engine.history.HistoricVariableInstanceQuery historicVariableInstanceQuery()
Overrides:
historicVariableInstanceQuery in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>

processDefinitionQuery

protected org.camunda.bpm.engine.repository.ProcessDefinitionQuery processDefinitionQuery()
Overrides:
processDefinitionQuery in class AbstractProcessAssert<TaskAssert,org.camunda.bpm.engine.task.Task>


Copyright © 2014 camunda services GmbH. All Rights Reserved.