1. Project Clover database Sat Feb 2 2019 06:45:20 CET
  2. Package org.xwiki.rendering.test.cts

File TestDataConfiguration.java

 

Coverage histogram

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

Code metrics

4
8
3
1
104
52
5
0.62
2.67
3
1.67

Classes

Class Line # Actions
TestDataConfiguration 36 8 0% 5 8
0.4666666746.7%
 

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: 2532d1c799c8fc79257e60b385e1c2efd67e4cbf $
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 == this) {
80  0 return true;
81    }
82  4 if (!(object instanceof TestDataConfiguration)) {
83  0 return false;
84    }
85  4 TestDataConfiguration rhs = (TestDataConfiguration) object;
86  4 return new EqualsBuilder()
87    .append(this.notApplicableTests, rhs.notApplicableTests)
88    .append(this.failingTests, rhs.failingTests)
89    .append(this.testDescriptions, rhs.testDescriptions)
90    .append(this.inheritSyntax, rhs.inheritSyntax)
91    .isEquals();
92    }
93   
 
94  0 toggle @Override
95    public int hashCode()
96    {
97  0 return new HashCodeBuilder(1, 15)
98    .append(this.notApplicableTests)
99    .append(this.failingTests)
100    .append(this.testDescriptions)
101    .append(this.inheritSyntax)
102    .toHashCode();
103    }
104    }