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

File TestDataConfiguration.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart5.png
74% of files have more coverage

Code metrics

6
10
3
1
107
55
6
0.6
3.33
3
2

Classes

Class Line # Actions
TestDataConfiguration 36 10 0% 6 10
0.4736842247.4%
 

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.rendering.test.cts;
21   
22    import java.util.Collections;
23    import java.util.List;
24    import java.util.Properties;
25   
26    import org.apache.commons.lang3.builder.EqualsBuilder;
27    import org.apache.commons.lang3.builder.HashCodeBuilder;
28    import org.xwiki.text.XWikiToStringBuilder;
29   
30    /**
31    * Contains Test configuration data (whether to run transformations or not, list of tests to ignore, etc).
32    *
33    * @version $Id: ffee84839866704a8addc7eec4fa0009002527f1 $
34    * @since 4.1M1
35    */
 
36    public class TestDataConfiguration
37    {
38    /**
39    * List of tests that are not applicable, using regexes (eg {@code .*/bold1\\(IN\\).*}).
40    */
41    public List<String> notApplicableTests = Collections.emptyList();
42   
43    /**
44    * List of tests that are excluded because they're currently failing (they need to be fixed ASAP), using regexes
45    * (eg {@code .*&#47;bold1\\(IN\\).*}).
46    */
47    public List<String> failingTests = Collections.emptyList();
48   
49    /**
50    * List of test descriptions.
51    */
52    public Properties testDescriptions = new Properties();
53   
54    /**
55    * The Syntax to inherit from if any. If an inherited syntax is specified then if a test doesn't exist for the
56    * current Syntax the test runner will look for that test in the inherited syntax.
57    */
58    public String inheritSyntax;
59   
60    /**
61    * The extension of the test files.
62    */
63    public String fileExtension = "txt";
64   
 
65  0 toggle @Override
66    public String toString()
67    {
68  0 return new XWikiToStringBuilder(this)
69    .append("notApplicableTests", this.notApplicableTests)
70    .append("failingTests", this.failingTests)
71    .append("testDescriptions", this.testDescriptions)
72    .append("inheritSyntax", this.testDescriptions)
73    .toString();
74    }
75   
 
76  4 toggle @Override
77    public boolean equals(Object object)
78    {
79  4 if (object == null) {
80  0 return false;
81    }
82  4 if (object == this) {
83  0 return true;
84    }
85  4 if (object.getClass() != getClass()) {
86  0 return false;
87    }
88  4 TestDataConfiguration rhs = (TestDataConfiguration) object;
89  4 return new EqualsBuilder()
90    .append(this.notApplicableTests, rhs.notApplicableTests)
91    .append(this.failingTests, rhs.failingTests)
92    .append(this.testDescriptions, rhs.testDescriptions)
93    .append(this.inheritSyntax, rhs.inheritSyntax)
94    .isEquals();
95    }
96   
 
97  0 toggle @Override
98    public int hashCode()
99    {
100  0 return new HashCodeBuilder(1, 15)
101    .append(this.notApplicableTests)
102    .append(this.failingTests)
103    .append(this.testDescriptions)
104    .append(this.inheritSyntax)
105    .toHashCode();
106    }
107    }