KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > bpel > def > BpelDefinitionDbTest


1 package org.jbpm.bpel.def;
2
3 import org.jbpm.bpel.db.AbstractDbTestCase;
4
5 public class BpelDefinitionDbTest extends AbstractDbTestCase {
6   
7   public void testScope() {
8     BpelDefinition processDefinition = new BpelDefinition("name");
9     
10     processDefinition = saveAndReload(processDefinition);
11
12     assertNotNull( processDefinition.getScope() );
13   }
14   
15   public void testImports() {
16     BpelDefinition processDefinition = new BpelDefinition();
17     
18     processDefinition = saveAndReload(processDefinition);
19
20     assertNotNull( processDefinition.getImports() );
21   }
22   
23   public void testAbstractProcess() {
24     BpelDefinition processDefinition = new BpelDefinition();
25     processDefinition.setAbstractProcess(true);
26     
27     processDefinition = saveAndReload(processDefinition);
28
29     assertEquals(true, processDefinition.isAbstractProcess());
30   }
31   
32   public void testEnableInstanceCompensation() {
33     BpelDefinition processDefinition = new BpelDefinition();
34     processDefinition.setEnableInstanceCompensation(true);
35     
36     processDefinition = saveAndReload(processDefinition);
37
38     assertEquals(true ,processDefinition.getEnableInstanceCompensation());
39   }
40   
41   public void testExpressionLanguage() {
42     BpelDefinition processDefinition = new BpelDefinition();
43     processDefinition.setExpressionLanguage("xpath");
44     
45     processDefinition = saveAndReload(processDefinition);
46
47     assertEquals("xpath" ,processDefinition.getExpressionLanguage());
48   }
49   
50   public void testQueryLanguage() {
51     BpelDefinition processDefinition = new BpelDefinition();
52     processDefinition.setQueryLanguage("java");
53     
54     processDefinition = saveAndReload(processDefinition);
55
56     assertEquals("java" ,processDefinition.getQueryLanguage());
57   }
58 }
59
Popular Tags