Clover Coverage Report - itracker
Coverage timestamp: Tue May 1 2012 16:42:12 CEST
62   118   32   15.5
0   89   0.52   4
4     8  
1    
 
 
  IssueActivityType       Line # 6 62 32 0% 0.0
 
No Tests
 
1    /**
2    *
3    */
4    package org.itracker.model;
5   
 
6    public enum IssueActivityType implements IntCodeEnum<IssueActivityType> {
7   
8    ISSUE_CREATED(1),
9   
10    STATUS_CHANGE(2),
11   
12    OWNER_CHANGE(3),
13   
14    SEVERITY_CHANGE(4),
15   
16    COMPONENTS_MODIFIED(5),
17   
18    VERSIONS_MODIFIED(6),
19   
20    REMOVE_HISTORY(7),
21   
22    ISSUE_MOVE(8),
23   
24    SYSTEM_UPDATE(9),
25   
26    TARGETVERSION_CHANGE(10),
27   
28    DESCRIPTION_CHANGE(11),
29   
30    RESOLUTION_CHANGE(12),
31   
32    RELATION_ADDED(13),
33   
34    RELATION_REMOVED(14);
35   
36    final int code;
37   
 
38  0 toggle private IssueActivityType(int code) {
39  0 this.code = code;
40    }
41   
42    /**
43    * @deprecated
44    * @param type
45    * @return
46    */
 
47  0 toggle public static final IssueActivityType forCode(int type) {
48  0 switch (type) {
49  0 case 1:
50  0 return ISSUE_CREATED;
51  0 case 2:
52  0 return STATUS_CHANGE;
53  0 case 3:
54  0 return OWNER_CHANGE;
55  0 case 4:
56  0 return SEVERITY_CHANGE;
57  0 case 5:
58  0 return COMPONENTS_MODIFIED;
59  0 case 6:
60  0 return VERSIONS_MODIFIED;
61  0 case 7:
62  0 return REMOVE_HISTORY;
63  0 case 8:
64  0 return ISSUE_MOVE;
65  0 case 9:
66  0 return SYSTEM_UPDATE;
67  0 case 10:
68  0 return TARGETVERSION_CHANGE;
69  0 case 11:
70  0 return DESCRIPTION_CHANGE;
71  0 case 12:
72  0 return RESOLUTION_CHANGE;
73  0 case 13:
74  0 return RELATION_ADDED;
75  0 case 14:
76  0 return RELATION_REMOVED;
77    }
78  0 return null;
79    }
80   
 
81  0 toggle public IssueActivityType fromCode(int code) {
82  0 switch (code) {
83  0 case 1:
84  0 return ISSUE_CREATED;
85  0 case 2:
86  0 return STATUS_CHANGE;
87  0 case 3:
88  0 return OWNER_CHANGE;
89  0 case 4:
90  0 return SEVERITY_CHANGE;
91  0 case 5:
92  0 return COMPONENTS_MODIFIED;
93  0 case 6:
94  0 return VERSIONS_MODIFIED;
95  0 case 7:
96  0 return REMOVE_HISTORY;
97  0 case 8:
98  0 return ISSUE_MOVE;
99  0 case 9:
100  0 return SYSTEM_UPDATE;
101  0 case 10:
102  0 return TARGETVERSION_CHANGE;
103  0 case 11:
104  0 return DESCRIPTION_CHANGE;
105  0 case 12:
106  0 return RESOLUTION_CHANGE;
107  0 case 13:
108  0 return RELATION_ADDED;
109  0 case 14:
110  0 return RELATION_REMOVED;
111    }
112  0 return null;
113    }
114   
 
115  0 toggle public int getCode() {
116  0 return this.code;
117    }
118    }