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

File TestBean.java

 

Coverage histogram

../../../../img/srcFileCovDistChart9.png
38% of files have more coverage

Code metrics

0
16
16
1
145
96
16
1
1
16
1

Classes

Class Line # Actions
TestBean 30 16 0% 16 6
0.812581.2%
 

Contributing tests

This file is covered by 2 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.properties.test;
21   
22    import java.util.List;
23   
24    import org.xwiki.properties.annotation.PropertyDescription;
25    import org.xwiki.properties.annotation.PropertyHidden;
26    import org.xwiki.properties.annotation.PropertyId;
27    import org.xwiki.properties.annotation.PropertyMandatory;
28    import org.xwiki.properties.annotation.PropertyName;
29   
 
30    public class TestBean
31    {
32    public static final String STATICFIELD = "staticfield";
33   
34    private String lowerprop;
35   
36    private String upperProp;
37   
38    private String prop1 = "defaultprop1";
39   
40    private int prop2;
41   
42    private boolean prop3;
43   
44    private String hiddenProperty;
45   
46    private List<Integer> genericProp;
47   
48    public String propertyWithDifferentId;
49   
50    @PropertyName("Public Field")
51    @PropertyDescription("a public field")
52    public String publicField;
53   
54    public List<Integer> genericField;
55   
56    @PropertyId("impossible.field.name")
57    public String publicFieldWithDifferentId;
58   
 
59  1 toggle public void setLowerprop(String lowerprop)
60    {
61  1 this.lowerprop = lowerprop;
62    }
63   
 
64  14 toggle public String getLowerprop()
65    {
66  14 return this.lowerprop;
67    }
68   
 
69  1 toggle public void setUpperProp(String upperProp)
70    {
71  1 this.upperProp = upperProp;
72    }
73   
 
74  14 toggle public String getUpperProp()
75    {
76  14 return this.upperProp;
77    }
78   
 
79  0 toggle @PropertyDescription("prop1 description")
80    public void setProp1(String prop1)
81    {
82  0 this.prop1 = prop1;
83    }
84   
 
85  13 toggle public String getProp1()
86    {
87  13 return this.prop1;
88    }
89   
 
90  1 toggle @PropertyMandatory
91    @PropertyDescription("prop2 description")
92    public void setProp2(int prop2)
93    {
94  1 this.prop2 = prop2;
95    }
96   
 
97  14 toggle public int getProp2()
98    {
99  14 return this.prop2;
100    }
101   
 
102  1 toggle public void setProp3(boolean prop3)
103    {
104  1 this.prop3 = prop3;
105    }
106   
 
107  14 toggle @PropertyMandatory
108    @PropertyDescription("prop3 description")
109    public boolean getProp3()
110    {
111  14 return this.prop3;
112    }
113   
 
114  0 toggle @PropertyHidden
115    public void setHiddenProperty(String hiddenProperty)
116    {
117  0 this.hiddenProperty = hiddenProperty;
118    }
119   
 
120  1 toggle public String getHiddenProperty()
121    {
122  1 return this.hiddenProperty;
123    }
124   
 
125  14 toggle public List<Integer> getGenericProp()
126    {
127  14 return this.genericProp;
128    }
129   
 
130  1 toggle public void setGenericProp(List<Integer> genericProp)
131    {
132  1 this.genericProp = genericProp;
133    }
134   
 
135  13 toggle @PropertyId("impossible.method.name")
136    public String getPropertyWithDifferentId()
137    {
138  13 return this.propertyWithDifferentId;
139    }
140   
 
141  0 toggle public void setPropertyWithDifferentId(String propertyWithDifferentId)
142    {
143  0 this.propertyWithDifferentId = propertyWithDifferentId;
144    }
145    }