cancel
Showing results for 
Search instead for 
Did you mean: 

code in the book VS. source code

tomi87
Champ in-the-making
Champ in-the-making
I'm confusing about the code in the book and the source code.
in the book the showed me:
public class LoanRequestTest {
@Rule
public ActivitiRule activitiRule =
new ActivitiRule("activiti.cfg-mem-fullhistory.xml");
….

in the source code they showed me:

import org.bpmnwithactiviti.chapter5.LoanApplication;
import org.bpmnwithactiviti.common.AbstractTest;

public class LoanRequestTest extends AbstractTest {   
   
  @Rule
   public ActivitiRule activitiRule = new ActivitiRule("activiti.cfg-mem-fullhistory.xml");


My question:
Should I extend a AbstractTest ?
and whats in it ?
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
The source-code is open, so you can easily check what's in it…

You don't have to use an AbstactTest, you can do just fine with a regular JUNIT 4-test, using the ActivitiRule. If you want to use jUnit3 to test Activiti, than you should extend a base-test class. Also see http://www.jorambarrez.be/blog/2012/09/24/how-to-write-a-unit-test/