Clover Coverage Report - kew-test 2.0.0-SNAPSHOT
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
../img/srcFileCovDistChart0.png 0% of files have more coverage
19   104   16   1.19
0   68   0.84   16
16     1  
1    
 
  MockPostProcessor       Line # 32 19 0% 16 35 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2005-2007 The Kuali Foundation
3    *
4    *
5    * Licensed under the Educational Community License, Version 2.0 (the "License");
6    * you may not use this file except in compliance with the License.
7    * You may obtain a copy of the License at
8    *
9    * http://www.opensource.org/licenses/ecl2.php
10    *
11    * Unless required by applicable law or agreed to in writing, software
12    * distributed under the License is distributed on an "AS IS" BASIS,
13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    * See the License for the specific language governing permissions and
15    * limitations under the License.
16    */
17    package mocks;
18   
19    import java.util.List;
20   
21    import org.kuali.rice.kew.postprocessor.ActionTakenEvent;
22    import org.kuali.rice.kew.postprocessor.AfterProcessEvent;
23    import org.kuali.rice.kew.postprocessor.BeforeProcessEvent;
24    import org.kuali.rice.kew.postprocessor.DeleteEvent;
25    import org.kuali.rice.kew.postprocessor.DocumentLockingEvent;
26    import org.kuali.rice.kew.postprocessor.DocumentRouteLevelChange;
27    import org.kuali.rice.kew.postprocessor.DocumentRouteStatusChange;
28    import org.kuali.rice.kew.postprocessor.PostProcessor;
29    import org.kuali.rice.kew.postprocessor.ProcessDocReport;
30   
31   
 
32    public class MockPostProcessor implements PostProcessor {
33   
34    private boolean processDocReportResult = true;
35    private boolean actionTakenResult = true;
36    private boolean processMethodsDocReportResult = true;
37    private List<Long> documentIdsToLockResult = null;
38   
 
39  0 toggle public MockPostProcessor() {
40  0 this(true);
41    }
42   
 
43  0 toggle public MockPostProcessor(boolean processDocReportResult) {
44  0 this(processDocReportResult, true);
45    }
46   
 
47  0 toggle public MockPostProcessor(boolean processDocReportResult, boolean actionTakenResult) {
48  0 this(processDocReportResult, actionTakenResult, true);
49    }
50   
 
51  0 toggle public MockPostProcessor(boolean processDocReportResult, boolean actionTakenResult, boolean processMethodsDocReportResult) {
52  0 this(processDocReportResult, actionTakenResult, processMethodsDocReportResult, null);
53    }
54   
 
55  0 toggle public MockPostProcessor(boolean processDocReportResult, boolean actionTakenResult, boolean processMethodsDocReportResult, List<Long> documentIdsToLockResult) {
56  0 this.processDocReportResult = processDocReportResult;
57  0 this.actionTakenResult = actionTakenResult;
58  0 this.processMethodsDocReportResult = processMethodsDocReportResult;
59  0 this.documentIdsToLockResult = documentIdsToLockResult;
60    }
61   
 
62  0 toggle public ProcessDocReport doDeleteRouteHeader(DeleteEvent event) throws Exception {
63  0 return new ProcessDocReport(processDocReportResult, "testing");
64    }
 
65  0 toggle public ProcessDocReport doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent) throws Exception {
66  0 return new ProcessDocReport(processDocReportResult, "testing");
67    }
 
68  0 toggle public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) throws Exception {
69  0 return new ProcessDocReport(processDocReportResult, "testing");
70    }
71   
 
72  0 toggle public ProcessDocReport doActionTaken(ActionTakenEvent event) throws Exception {
73  0 return new ProcessDocReport(actionTakenResult, "testing");
74    }
75   
 
76  0 toggle public ProcessDocReport beforeProcess(BeforeProcessEvent event) throws Exception {
77  0 return new ProcessDocReport(processMethodsDocReportResult, "testing");
78    }
79   
 
80  0 toggle public ProcessDocReport afterProcess(AfterProcessEvent event) throws Exception {
81  0 return new ProcessDocReport(processMethodsDocReportResult, "testing");
82    }
83   
 
84  0 toggle public List<Long> getDocumentIdsToLock(DocumentLockingEvent lockingEvent) throws Exception {
85  0 return documentIdsToLockResult;
86    }
87   
 
88  0 toggle public void setProcessDocReportResult(boolean processDocReportResult) {
89  0 this.processDocReportResult = processDocReportResult;
90    }
91   
 
92  0 toggle public void setActionTakenResult(boolean actionTakenResult) {
93  0 this.actionTakenResult = actionTakenResult;
94    }
95   
 
96  0 toggle public void setProcessMethodsDocReportResult(boolean processMethodsDocReportResult) {
97  0 this.processMethodsDocReportResult = processMethodsDocReportResult;
98    }
99   
 
100  0 toggle public void setDocumentIdsToLockResult(List<Long> documentIdsToLockResult) {
101  0 this.documentIdsToLockResult = documentIdsToLockResult;
102    }
103   
104    }