Package org.activiti

Source Code of org.activiti.MyUnitTest

package org.activiti;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.activiti.engine.test.ActivitiRule;
import org.activiti.engine.test.Deployment;
import org.junit.Rule;
import org.junit.Test;

import static org.junit.Assert.*;

public class MyUnitTest {
 
  @Rule
  public ActivitiRule activitiRule = new ActivitiRule();
 
  @Test
  @Deployment(resources = {"org/activiti/test/my-process.bpmn20.xml"})
  public void test() {
    ProcessInstance processInstance = activitiRule.getRuntimeService().startProcessInstanceByKey("my-process");
    assertNotNull(processInstance);
   
    Task task = activitiRule.getTaskService().createTaskQuery().singleResult();
    assertEquals("Activiti is awesome!", task.getName());
  }

}
TOP

Related Classes of org.activiti.MyUnitTest

TOP
Copyright © 2018 www.massapi.com. 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.