1
2
3
4
5
6
7
8
9 package bexee.model.activity;
10
11 import org.jmock.*;
12
13 import bexee.core.*;
14 import bexee.model.activity.impl.InvokeImpl;
15
16 /***
17 * @version $Revision: 1.1 $, $Date: 2004/12/15 14:18:16 $
18 * @author Pawel Kowalski
19 */
20 public class InvokeImplTest extends MockObjectTestCase {
21
22 private InvokeImpl invoke = null;
23
24
25
26
27 protected void setUp() throws Exception {
28 super.setUp();
29 invoke = new InvokeImpl();
30 }
31
32
33
34
35 protected void tearDown() throws Exception {
36 super.tearDown();
37 invoke = null;
38 }
39
40 //***************************************************/
41
42 //***************************************************/
43
44 //***************************************************/
45
46 //***************************************************/
47
48 public final void testAccept() {
49 Mock mockProcessController = new Mock(ProcessController.class);
50
51 ProcessInstance processInstance = new ProcessInstance(null, null);
52
53 mockProcessController.expects(once()).method("process").with(
54 same(invoke), same(processInstance));
55
56 try {
57 invoke.accept((ProcessController) mockProcessController.proxy(),
58 processInstance);
59 } catch (Exception e) {
60 e.printStackTrace();
61 }
62
63 mockProcessController.verify();
64 }
65
66 public final void testDefaultValues() {
67 assertEquals(false, invoke.isSuppressJoinFailure());
68 }
69
70 }