|
1 |
| package com.agical.rmock.core.strategy.impl; |
|
2 |
| |
|
3 |
| import java.util.Iterator; |
|
4 |
| import java.util.LinkedList; |
|
5 |
| import java.util.List; |
|
6 |
| |
|
7 |
| import com.agical.rmock.core.strategy.TestStep; |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| public class CompositeStep implements TestStep { |
|
16 |
| private List steps = new LinkedList(); |
|
17 |
| |
|
18 |
| |
|
19 |
| |
|
20 |
| |
|
21 |
564
| public void run() throws Throwable {
|
|
22 |
564
| for (Iterator iter = steps.iterator(); iter.hasNext();) {
|
|
23 |
2689
| TestStep step = (TestStep) iter.next();
|
|
24 |
2689
| step.run();
|
|
25 |
| } |
|
26 |
| } |
|
27 |
| |
|
28 |
| |
|
29 |
| |
|
30 |
| |
|
31 |
| |
|
32 |
2762
| public void addStep(TestStep step) {
|
|
33 |
2762
| steps.add(step);
|
|
34 |
| } |
|
35 |
| |
|
36 |
| } |