Search in sources :

Example 1 with TaskEntityImpl

use of org.activiti.engine.impl.persistence.entity.TaskEntityImpl in project Activiti by Activiti.

the class ExecutionElResolverTest method resolve_should_returnVariableScopeExecutionWhenItsTaskEntity.

@Test
public void resolve_should_returnVariableScopeExecutionWhenItsTaskEntity() {
    // given
    ExecutionEntityImpl execution = new ExecutionEntityImpl();
    TaskEntityImpl variableScope = new TaskEntityImpl();
    variableScope.setExecution(execution);
    // when
    Object result = resolver.resolve(EXECUTION_KEY, variableScope);
    // then
    assertThat(result).isEqualTo(execution);
}
Also used : ExecutionEntityImpl(org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl) TaskEntityImpl(org.activiti.engine.impl.persistence.entity.TaskEntityImpl) Test(org.junit.Test)

Example 2 with TaskEntityImpl

use of org.activiti.engine.impl.persistence.entity.TaskEntityImpl in project Activiti by Activiti.

the class ExecutionElResolverTest method canResolve_should_returnTrueWhenItsTaskEntityAndPropertyIsExecution.

@Test
public void canResolve_should_returnTrueWhenItsTaskEntityAndPropertyIsExecution() {
    // when
    boolean canResolve = resolver.canResolve(EXECUTION_KEY, new TaskEntityImpl());
    // then
    assertThat(canResolve).isTrue();
}
Also used : TaskEntityImpl(org.activiti.engine.impl.persistence.entity.TaskEntityImpl) Test(org.junit.Test)

Example 3 with TaskEntityImpl

use of org.activiti.engine.impl.persistence.entity.TaskEntityImpl in project Activiti by Activiti.

the class TaskElResolverTest method resolve_should_returnVariableScope.

@Test
public void resolve_should_returnVariableScope() {
    // given
    TaskEntity variableScope = new TaskEntityImpl();
    // when
    Object result = resolver.resolve(TASK_KEY, variableScope);
    // then
    assertThat(result).isEqualTo(variableScope);
}
Also used : TaskEntity(org.activiti.engine.impl.persistence.entity.TaskEntity) TaskEntityImpl(org.activiti.engine.impl.persistence.entity.TaskEntityImpl) Test(org.junit.Test)

Example 4 with TaskEntityImpl

use of org.activiti.engine.impl.persistence.entity.TaskEntityImpl in project Activiti by Activiti.

the class TaskElResolverTest method canResolve_should_returnFalseWhenItsTaskEntityAndPropertyIsNotTask.

@Test
public void canResolve_should_returnFalseWhenItsTaskEntityAndPropertyIsNotTask() {
    // when
    boolean canResolve = resolver.canResolve("differentFromTask", new TaskEntityImpl());
    // then
    assertThat(canResolve).isFalse();
}
Also used : TaskEntityImpl(org.activiti.engine.impl.persistence.entity.TaskEntityImpl) Test(org.junit.Test)

Example 5 with TaskEntityImpl

use of org.activiti.engine.impl.persistence.entity.TaskEntityImpl in project Activiti by Activiti.

the class TaskElResolverTest method canResolve_should_returnTrueWhenItsTaskEntityAndPropertyIsTask.

@Test
public void canResolve_should_returnTrueWhenItsTaskEntityAndPropertyIsTask() {
    // when
    boolean canResolve = resolver.canResolve(TASK_KEY, new TaskEntityImpl());
    // then
    assertThat(canResolve).isTrue();
}
Also used : TaskEntityImpl(org.activiti.engine.impl.persistence.entity.TaskEntityImpl) Test(org.junit.Test)

Aggregations

TaskEntityImpl (org.activiti.engine.impl.persistence.entity.TaskEntityImpl)5 Test (org.junit.Test)5 ExecutionEntityImpl (org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl)1 TaskEntity (org.activiti.engine.impl.persistence.entity.TaskEntity)1