1. Project Clover database Sat Feb 2 2019 06:45:20 CET
  2. Package org.xwiki.component.wiki

File TestImplementation.java

 

Code metrics

0
9
7
1
82
46
7
0.78
1.29
7
1

Classes

Class Line # Actions
TestImplementation 31 9 0% 7 2
0.87587.5%
 

Contributing tests

This file is covered by 1 test. .

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.component.wiki;
21   
22    import java.lang.reflect.Type;
23   
24    import org.xwiki.model.reference.DocumentReference;
25   
26    /**
27    * Stub wiki component implementation for testing.
28    *
29    * @version $Id: f80ccb5280bafbfda4760b3c8676d81a4e322c5e $
30    */
 
31    public class TestImplementation implements TestRole, WikiComponent
32    {
33    private DocumentReference documentReference;
34   
35    private DocumentReference authorReference;
36   
37    private WikiComponentScope scope;
38   
 
39  1 toggle public TestImplementation(DocumentReference documentReference, DocumentReference authorReference,
40    WikiComponentScope scope)
41    {
42  1 this.documentReference = documentReference;
43  1 this.authorReference = authorReference;
44  1 this.scope = scope;
45    }
46   
 
47  0 toggle @Override
48    public String test()
49    {
50  0 return "test";
51    }
52   
 
53  6 toggle @Override
54    public DocumentReference getDocumentReference()
55    {
56  6 return this.documentReference;
57    }
58   
 
59  3 toggle @Override
60    public DocumentReference getAuthorReference()
61    {
62  3 return this.authorReference;
63    }
64   
 
65  3 toggle @Override
66    public Type getRoleType()
67    {
68  3 return TestRole.class;
69    }
70   
 
71  3 toggle @Override
72    public String getRoleHint()
73    {
74  3 return "roleHint";
75    }
76   
 
77  3 toggle @Override
78    public WikiComponentScope getScope()
79    {
80  3 return this.scope;
81    }
82    }