1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.uiextension

File UIExtensions.java

 

Coverage histogram

../../../img/srcFileCovDistChart6.png
69% of files have more coverage

Code metrics

0
42
28
8
233
182
28
0.67
1.5
3.5
1

Classes

Class Line # Actions
UIExtensions 27 0 - 0 0
-1.0 -
UIExtensions.TestUix1valueZ 29 6 0% 4 4
0.660%
UIExtensions.TestUix2valueY 58 6 0% 4 4
0.660%
UIExtensions.TestUix3valueX 87 6 0% 4 4
0.660%
UIExtensions.TestUix4valueW 116 6 0% 4 4
0.660%
UIExtensions.TestUix5value1 146 6 0% 4 4
0.660%
UIExtensions.TestUix6value11 175 6 0% 4 4
0.660%
UIExtensions.TestUix7value2 205 6 0% 4 4
0.660%
 

Contributing tests

This file is covered by 5 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.uiextension;
21   
22    import java.util.HashMap;
23    import java.util.Map;
24   
25    import org.xwiki.rendering.block.Block;
26   
 
27    public class UIExtensions
28    {
 
29    public static class TestUix1valueZ implements UIExtension
30    {
 
31  9 toggle @Override
32    public String getId()
33    {
34  9 return "platform.testuix1";
35    }
36   
 
37  0 toggle @Override
38    public String getExtensionPointId()
39    {
40  0 return "platform.test";
41    }
42   
 
43  3 toggle @Override
44    public Map<String, String> getParameters()
45    {
46  3 Map<String, String> parameters = new HashMap<String, String>();
47  3 parameters.put("key", "valueZ");
48  3 return parameters;
49    }
50   
 
51  0 toggle @Override
52    public Block execute()
53    {
54  0 return null;
55    }
56    }
57   
 
58    public static class TestUix2valueY implements UIExtension
59    {
 
60  8 toggle @Override
61    public String getId()
62    {
63  8 return "platform.testuix2";
64    }
65   
 
66  0 toggle @Override
67    public String getExtensionPointId()
68    {
69  0 return "platform.test";
70    }
71   
 
72  3 toggle @Override
73    public Map<String, String> getParameters()
74    {
75  3 Map<String, String> parameters = new HashMap<String, String>();
76  3 parameters.put("key", "valueY");
77  3 return parameters;
78    }
79   
 
80  0 toggle @Override
81    public Block execute()
82    {
83  0 return null;
84    }
85    }
86   
 
87    public static class TestUix3valueX implements UIExtension
88    {
 
89  11 toggle @Override
90    public String getId()
91    {
92  11 return "platform.testuix3";
93    }
94   
 
95  0 toggle @Override
96    public String getExtensionPointId()
97    {
98  0 return "platform.test";
99    }
100   
 
101  5 toggle @Override
102    public Map<String, String> getParameters()
103    {
104  5 Map<String, String> parameters = new HashMap<String, String>();
105  5 parameters.put("key", "valueX");
106  5 return parameters;
107    }
108   
 
109  0 toggle @Override
110    public Block execute()
111    {
112  0 return null;
113    }
114    }
115   
 
116    public static class TestUix4valueW implements UIExtension
117    {
 
118  8 toggle @Override
119    public String getId()
120    {
121  8 return "platform.testuix4";
122    }
123   
 
124  0 toggle @Override
125    public String getExtensionPointId()
126    {
127  0 return "platform.test";
128    }
129   
 
130  4 toggle @Override
131    public Map<String, String> getParameters()
132    {
133  4 Map<String, String> parameters = new HashMap<String, String>();
134  4 parameters.put("key", "valueW");
135  4 return parameters;
136    }
137   
 
138  0 toggle @Override
139    public Block execute()
140    {
141  0 return null;
142    }
143    }
144   
145   
 
146    public static class TestUix5value1 implements UIExtension
147    {
 
148  9 toggle @Override
149    public String getId()
150    {
151  9 return "platform.testuix5";
152    }
153   
 
154  0 toggle @Override
155    public String getExtensionPointId()
156    {
157  0 return "platform.test";
158    }
159   
 
160  3 toggle @Override
161    public Map<String, String> getParameters()
162    {
163  3 Map<String, String> parameters = new HashMap<String, String>();
164  3 parameters.put("key", "1");
165  3 return parameters;
166    }
167   
 
168  0 toggle @Override
169    public Block execute()
170    {
171  0 return null;
172    }
173    }
174   
 
175    public static class TestUix6value11 implements UIExtension
176    {
 
177  10 toggle @Override
178    public String getId()
179    {
180  10 return "platform.testuix6";
181    }
182   
 
183  0 toggle @Override
184    public String getExtensionPointId()
185    {
186  0 return "platform.test";
187    }
188   
 
189  5 toggle @Override
190    public Map<String, String> getParameters()
191    {
192  5 Map<String, String> parameters = new HashMap<String, String>();
193  5 parameters.put("key", "11");
194  5 return parameters;
195    }
196   
 
197  0 toggle @Override
198    public Block execute()
199    {
200  0 return null;
201    }
202    }
203   
204   
 
205    public static class TestUix7value2 implements UIExtension
206    {
 
207  7 toggle @Override
208    public String getId()
209    {
210  7 return "platform.testuix7";
211    }
212   
 
213  0 toggle @Override
214    public String getExtensionPointId()
215    {
216  0 return "platform.test";
217    }
218   
 
219  3 toggle @Override
220    public Map<String, String> getParameters()
221    {
222  3 Map<String, String> parameters = new HashMap<String, String>();
223  3 parameters.put("key", "2");
224  3 return parameters;
225    }
226   
 
227  0 toggle @Override
228    public Block execute()
229    {
230  0 return null;
231    }
232    }
233    }