This is an automated email from the ASF dual-hosted git repository.
claude pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/creadur-rat.git
The following commit(s) were added to refs/heads/master by this push:
new 8fc0a15d RAT-14: Verification for RAT-14 (#396)
8fc0a15d is described below
commit 8fc0a15de2c706f0dc5d799434f3fcade043061e
Author: Claude Warren <[email protected]>
AuthorDate: Tue Nov 19 20:35:59 2024 +0000
RAT-14: Verification for RAT-14 (#396)
* Verification for RAT-14
Added integration test
Modified Reporter to allows exec() call and return a ClaimStatistic object.
* updated javadoc
* RAT-14: Added changelog and reduced visibility of execute()
* updated reporter test.
* RAT-14: Groovify verify.groovy
* RAT-14: Fixed test and simplified assertions
---------
Co-authored-by: P. Ottlinger <[email protected]>
---
.../it/resources/ReportTest/RAT_14/commandLine.txt | 3 +
.../resources/ReportTest/RAT_14/src/Image-png.not | Bin 0 -> 1098 bytes
.../src/it/resources/ReportTest/RAT_14/src/NOTICE | 7 ++
.../ReportTest/RAT_14/src/UTF16_with_signature.xml | Bin 0 -> 2402 bytes
.../ReportTest/RAT_14/src/UTF8_with_signature.xml | 29 +++++++
.../resources/ReportTest/RAT_14/src/dummy.tar.gz | Bin 0 -> 5342 bytes
.../it/resources/ReportTest/RAT_14/src/file.cpp | 24 ++++++
.../resources/ReportTest/RAT_14/src/generated.txt | 3 +
.../RAT_14/src/leader-election-message-arrives.dia | Bin 0 -> 5796 bytes
.../resources/ReportTest/RAT_14/src/side_left.bmp | Bin 0 -> 345238 bytes
.../ReportTest/RAT_14/src/unix-newlines.txt.bin | 8 ++
.../ReportTest/RAT_14/src/windows-newlines.txt.bin | 9 +++
.../it/resources/ReportTest/RAT_14/verify.groovy | 83 +++++++++++++++++++++
.../src/main/java/org/apache/rat/Reporter.java | 20 +++--
.../src/test/java/org/apache/rat/ReporterTest.java | 77 ++++++++++++++++---
.../java/org/apache/rat/ReporterTestUtils.java | 4 +-
src/changes/changes.xml | 3 +
17 files changed, 253 insertions(+), 17 deletions(-)
diff --git a/apache-rat-core/src/it/resources/ReportTest/RAT_14/commandLine.txt
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/commandLine.txt
new file mode 100644
index 00000000..74e39fb8
--- /dev/null
+++ b/apache-rat-core/src/it/resources/ReportTest/RAT_14/commandLine.txt
@@ -0,0 +1,3 @@
+--counter-max
+UNAPPROVED:-1
+--
diff --git
a/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/Image-png.not
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/Image-png.not
new file mode 100644
index 00000000..10577d4e
Binary files /dev/null and
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/Image-png.not differ
diff --git a/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/NOTICE
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/NOTICE
new file mode 100644
index 00000000..967464b9
--- /dev/null
+++ b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/NOTICE
@@ -0,0 +1,7 @@
+=========================================================================
+== NOTICE file corresponding to section 4(d) of the Apache License, ==
+== Version 2.0. ==
+=========================================================================
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
diff --git
a/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/UTF16_with_signature.xml
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/UTF16_with_signature.xml
new file mode 100644
index 00000000..9e9104ef
Binary files /dev/null and
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/UTF16_with_signature.xml
differ
diff --git
a/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/UTF8_with_signature.xml
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/UTF8_with_signature.xml
new file mode 100644
index 00000000..b82c0eeb
--- /dev/null
+++
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/UTF8_with_signature.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+ <!--
+ ***************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ***************************************************************
+ -->
+
+
+<xmlRoot>
+<descrition>
+The file encoding is UTF-8 with signature. (Special chars: äöü)
+</descrition>
+</xmlRoot>
diff --git
a/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/dummy.tar.gz
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/dummy.tar.gz
new file mode 100644
index 00000000..3354fb74
Binary files /dev/null and
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/dummy.tar.gz differ
diff --git a/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/file.cpp
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/file.cpp
new file mode 100644
index 00000000..7a1eef16
--- /dev/null
+++ b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/file.cpp
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ */
+#include <iostream>
+
+int main() {
+ std::cout << "Hello World!";
+ return 0;
+}
diff --git
a/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/generated.txt
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/generated.txt
new file mode 100644
index 00000000..8b438ec7
--- /dev/null
+++ b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/generated.txt
@@ -0,0 +1,3 @@
+DO NOT EDIT THIS FILE - it is machine generated
+
+Not really but just for testing.
\ No newline at end of file
diff --git
a/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/leader-election-message-arrives.dia
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/leader-election-message-arrives.dia
new file mode 100644
index 00000000..41fa5300
Binary files /dev/null and
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/leader-election-message-arrives.dia
differ
diff --git
a/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/side_left.bmp
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/side_left.bmp
new file mode 100644
index 00000000..c1d3d69a
Binary files /dev/null and
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/side_left.bmp differ
diff --git
a/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/unix-newlines.txt.bin
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/unix-newlines.txt.bin
new file mode 100644
index 00000000..2c498da3
--- /dev/null
+++
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/unix-newlines.txt.bin
@@ -0,0 +1,8 @@
+sentence 1.
+sentence 2.
+
+
+sentence 3.
+
+sentence 4.
+
diff --git
a/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/windows-newlines.txt.bin
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/windows-newlines.txt.bin
new file mode 100644
index 00000000..a0adb98f
--- /dev/null
+++
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/src/windows-newlines.txt.bin
@@ -0,0 +1,9 @@
+sentence 1.
+sentence 2.
+
+
+sentence 3.
+
+sentence 4.
+
+
diff --git a/apache-rat-core/src/it/resources/ReportTest/RAT_14/verify.groovy
b/apache-rat-core/src/it/resources/ReportTest/RAT_14/verify.groovy
new file mode 100644
index 00000000..cc2ec991
--- /dev/null
+++ b/apache-rat-core/src/it/resources/ReportTest/RAT_14/verify.groovy
@@ -0,0 +1,83 @@
+package ReportTest.RAT_14
+
+import org.apache.rat.OptionCollection
+import org.apache.rat.ReportConfiguration
+import org.apache.rat.Reporter
+import org.apache.rat.report.claim.ClaimStatistic
+import org.apache.rat.testhelpers.TextUtils
+import org.apache.rat.utils.DefaultLog
+
+import static org.junit.jupiter.api.Assertions.assertEquals
+import static org.junit.jupiter.api.Assertions.assertNotNull
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+output = new File(args[0])
+content = output.text
+
+TextUtils.assertPatternInTarget("^Approved:\\s+4 ", content)
+TextUtils.assertPatternInTarget("^Archives:\\s+2 ", content)
+TextUtils.assertPatternInTarget("^Binaries:\\s+2 ", content)
+TextUtils.assertPatternInTarget("^Document types:\\s+5 ", content)
+TextUtils.assertPatternInTarget("^Generated:\\s+1 ", content)
+TextUtils.assertPatternInTarget("^License categories:\\s+3 ", content)
+TextUtils.assertPatternInTarget("^License names:\\s+3 ", content)
+TextUtils.assertPatternInTarget("^Notices:\\s+1 ", content)
+TextUtils.assertPatternInTarget("^Standards: \\s+5 ", content)
+TextUtils.assertPatternInTarget("^Unapproved:\\s+2 ", content)
+TextUtils.assertPatternInTarget("^Unknown:\\s+2 ", content)
+
+logOutput = new File(args[1])
+log = logOutput.text
+
+TextUtils.assertPatternInTarget("^INFO:\\s+Approved:\\s+4\$", log)
+TextUtils.assertPatternInTarget("^INFO:\\s+Archives:\\s+2\$", log)
+TextUtils.assertPatternInTarget("^INFO:\\s+Binaries:\\s+2\$", log)
+TextUtils.assertPatternInTarget("^INFO:\\s+Document types:\\s+5\$", log)
+TextUtils.assertPatternInTarget("^INFO:\\s+Generated:\\s+1\$", log)
+TextUtils.assertPatternInTarget("^INFO:\\s+License categories:\\s+3\$", log)
+TextUtils.assertPatternInTarget("^INFO:\\s+License names:\\s+3\$", log)
+TextUtils.assertPatternInTarget("^INFO:\\s+Notices:\\s+1\$", log)
+TextUtils.assertPatternInTarget("^INFO:\\s+Standards: \\s+5\$", log)
+TextUtils.assertPatternInTarget("^INFO:\\s+Unapproved:\\s+2\$", log)
+TextUtils.assertPatternInTarget("^INFO:\\s+Unknown:\\s+2\$", log)
+
+// test without generating output.
+File src = new File(output.getParent(), "src")
+String[] myArgs = new String[4]
+myArgs[0] = "--counter-max"
+myArgs[1] = "UNAPPROVED:-1"
+myArgs[2] = "--"
+myArgs[3] = src.getAbsolutePath()
+
+ReportConfiguration configuration = OptionCollection.parseCommands(myArgs, {
opts -> })
+assertNotNull(configuration)
+configuration.validate(DefaultLog.getInstance().&error)
+Reporter reporter = new Reporter(configuration)
+ClaimStatistic statistic = reporter.execute()
+
+assertEquals(4, statistic.getCounter(ClaimStatistic.Counter.APPROVED))
+assertEquals(2, statistic.getCounter(ClaimStatistic.Counter.ARCHIVES))
+assertEquals(2, statistic.getCounter(ClaimStatistic.Counter.BINARIES))
+assertEquals(5, statistic.getCounter(ClaimStatistic.Counter.DOCUMENT_TYPES))
+assertEquals(1, statistic.getCounter(ClaimStatistic.Counter.GENERATED))
+assertEquals(3,
statistic.getCounter(ClaimStatistic.Counter.LICENSE_CATEGORIES))
+assertEquals(3, statistic.getCounter(ClaimStatistic.Counter.LICENSE_NAMES))
+assertEquals(1, statistic.getCounter(ClaimStatistic.Counter.NOTICES))
+assertEquals(5, statistic.getCounter(ClaimStatistic.Counter.STANDARDS))
+assertEquals(2, statistic.getCounter(ClaimStatistic.Counter.UNAPPROVED))
+assertEquals(2, statistic.getCounter(ClaimStatistic.Counter.UNKNOWN))
\ No newline at end of file
diff --git a/apache-rat-core/src/main/java/org/apache/rat/Reporter.java
b/apache-rat-core/src/main/java/org/apache/rat/Reporter.java
index 5596854a..090f2c78 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/Reporter.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/Reporter.java
@@ -48,7 +48,7 @@ import org.apache.rat.report.xml.writer.XmlWriter;
import org.w3c.dom.Document;
/**
- * Class that executes the report as defined in a ReportConfiguration and
stores
+ * Class that executes the report as defined in a {@link ReportConfiguration}
and stores
* the result for later handling.
*/
public class Reporter {
@@ -76,9 +76,13 @@ public class Reporter {
/**
* Executes the report and builds the output.
+ * This method will build the internal XML document if it does not already
exist.
+ * If this method or either of the {@link #output()} methods have already
been called this method will return
+ * the previous results.
+ * @return the claim statistics.
* @throws RatException on error.
*/
- private void exec() throws RatException {
+ public ClaimStatistic execute() throws RatException {
if (document == null || statistic == null) {
try {
if (configuration.getReportable() != null) {
@@ -102,6 +106,7 @@ public class Reporter {
throw RatException.makeRatException(e);
}
}
+ return statistic;
}
/**
@@ -123,14 +128,15 @@ public class Reporter {
}
/**
- * Outputs the report to the specified output using the optional
stylesheet.
+ * Outputs the report to the specified output using the stylesheet. It is
safe to call this method more than once
+ * in order to generate multiple reports from the same run.
*
- * @param stylesheet the style sheet to use for XSLT formatting, may be
null for XML output.
+ * @param stylesheet the style sheet to use for XSLT formatting.
* @param output the output stream to write to.
- * @throws RatException one error.
+ * @throws RatException on error.
*/
public void output(final IOSupplier<InputStream> stylesheet, final
IOSupplier<OutputStream> output) throws RatException {
- exec();
+ execute();
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transformer;
try (OutputStream out = output.get();
@@ -164,7 +170,7 @@ public class Reporter {
}
/**
- * Writes a summary of issues with the run.
+ * Writes a text summary of issues with the run.
* @param appendable the appendable to write to.
* @throws IOException on error.
*/
diff --git a/apache-rat-core/src/test/java/org/apache/rat/ReporterTest.java
b/apache-rat-core/src/test/java/org/apache/rat/ReporterTest.java
index 3796cba8..c35638a9 100644
--- a/apache-rat-core/src/test/java/org/apache/rat/ReporterTest.java
+++ b/apache-rat-core/src/test/java/org/apache/rat/ReporterTest.java
@@ -18,7 +18,7 @@
*/
package org.apache.rat;
-import static org.apache.commons.io.FileUtils.getFile;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Fail.fail;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -31,6 +31,9 @@ import java.io.IOException;
import java.io.PrintStream;
import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.List;
+import java.util.TreeMap;
import javax.xml.XMLConstants;
import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMSource;
@@ -44,8 +47,10 @@ import javax.xml.xpath.XPathFactory;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.DefaultParser;
+import org.apache.commons.cli.ParseException;
import org.apache.commons.io.FileUtils;
import org.apache.rat.api.Document.Type;
+import org.apache.rat.api.RatException;
import org.apache.rat.commandline.StyleSheets;
import org.apache.rat.document.FileDocument;
import org.apache.rat.document.DocumentName;
@@ -74,6 +79,62 @@ public class ReporterTest {
basedir = new File(Files.currentFolder(),
"target/test-classes/elements").getPath();
}
+ @Test
+ public void testExecute() throws RatException, ParseException {
+ File output = new File(tempDirectory, "testExecute");
+
+ CommandLine cl = new
DefaultParser().parse(OptionCollection.buildOptions(), new
String[]{"--output-style", "xml", "--output-file", output.getPath()});
+ ReportConfiguration config =
OptionCollection.createConfiguration(basedir, cl);
+ ClaimStatistic statistic = new Reporter(config).execute();
+
+ assertEquals(1, statistic.getCounter(Type.ARCHIVE));
+ assertEquals(2, statistic.getCounter(Type.BINARY));
+ assertEquals(1, statistic.getCounter(Type.GENERATED));
+ assertEquals(2, statistic.getCounter(Type.NOTICE));
+ assertEquals(8, statistic.getCounter(Type.STANDARD));
+ assertEquals(0, statistic.getCounter(Type.UNKNOWN));
+ assertEquals(9, statistic.getCounter(ClaimStatistic.Counter.APPROVED));
+ assertEquals(1, statistic.getCounter(ClaimStatistic.Counter.ARCHIVES));
+ assertEquals(2, statistic.getCounter(ClaimStatistic.Counter.BINARIES));
+ assertEquals(5,
statistic.getCounter(ClaimStatistic.Counter.DOCUMENT_TYPES));
+ assertEquals(1,
statistic.getCounter(ClaimStatistic.Counter.GENERATED));
+ assertEquals(5,
statistic.getCounter(ClaimStatistic.Counter.LICENSE_CATEGORIES));
+ assertEquals(6,
statistic.getCounter(ClaimStatistic.Counter.LICENSE_NAMES));
+ assertEquals(2, statistic.getCounter(ClaimStatistic.Counter.NOTICES));
+ assertEquals(8,
statistic.getCounter(ClaimStatistic.Counter.STANDARDS));
+ assertEquals(2,
statistic.getCounter(ClaimStatistic.Counter.UNAPPROVED));
+ assertEquals(2, statistic.getCounter(ClaimStatistic.Counter.UNKNOWN));
+
+ List<Type> typeList = statistic.getDocumentTypes();
+ assertEquals(Arrays.asList(Type.ARCHIVE, Type.BINARY, Type.GENERATED,
Type.NOTICE, Type.STANDARD), typeList);
+
+ TreeMap<String, Integer> expected = new TreeMap<>();
+ expected.put("Unknown license", 2);
+ expected.put("Apache License Version 2.0", 5);
+ expected.put("The MIT License", 1);
+ expected.put("BSD 3 clause", 1);
+ expected.put("Generated Files", 1);
+ expected.put("The Telemanagement Forum License", 1);
+ TreeMap<String, Integer> actual = new TreeMap<>();
+
+ for (String licenseName : statistic.getLicenseNames()) {
+ actual.put(licenseName,
statistic.getLicenseNameCount(licenseName));
+ }
+ assertEquals(expected, actual);
+
+ expected.clear();
+ expected.put("?????", 2);
+ expected.put("AL ", 5);
+ expected.put("BSD-3", 2);
+ expected.put("GEN ", 1);
+ expected.put("MIT ", 1);
+ actual.clear();
+ for (String licenseCategory : statistic.getLicenseFamilyCategories()) {
+ actual.put(licenseCategory,
statistic.getLicenseCategoryCount(licenseCategory));
+ }
+ assertEquals(expected, actual);
+ }
+
@Test
public void testOutputOption() throws Exception {
File output = new File(tempDirectory, "test");
@@ -89,8 +150,8 @@ public class ReporterTest {
@Test
public void testDefaultOutput() throws Exception {
- File output = new File(tempDirectory, "sysout");
- output.delete();
+ File output = new File(tempDirectory, "testDefaultOutput");
+
PrintStream origin = System.out;
try (PrintStream out = new PrintStream(output)) {
System.setOut(out);
@@ -107,9 +168,7 @@ public class ReporterTest {
@Test
public void testXMLOutput() throws Exception {
- File output = new File(tempDirectory, "sysout");
- output.delete();
- PrintStream origin = System.out;
+ File output = new File(tempDirectory, "testXMLOutput");
CommandLine cl = new
DefaultParser().parse(OptionCollection.buildOptions(), new
String[]{"--output-style", "xml", "--output-file", output.getPath()});
ReportConfiguration config =
OptionCollection.createConfiguration(basedir, cl);
@@ -179,8 +238,8 @@ public class ReporterTest {
* @param hasSample true if a sample from the document should be present.
* @throws Exception on XPath error.
*/
- private static void checkNode(Document doc, XPath xpath, String resource,
LicenseInfo licenseInfo, String type,
- boolean hasSample) throws Exception {
+ private static void checkNode(final Document doc, final XPath xpath, final
String resource, final LicenseInfo licenseInfo,
+ final String type, final boolean hasSample)
throws Exception {
XmlUtils.getNode(doc, xpath,
String.format("/rat-report/resource[@name='%s'][@type='%s']", resource, type));
if (licenseInfo != null) {
XmlUtils.getNode(doc, xpath,
@@ -212,7 +271,7 @@ public class ReporterTest {
return configuration;
}
- private void verifyStandardContent(String document) {
+ private void verifyStandardContent(final String document) {
TextUtils.assertPatternInTarget("^Notices:\\s*2 ", document);
TextUtils.assertPatternInTarget("^Binaries:\\s*2 ", document);
TextUtils.assertPatternInTarget("^Archives:\\s*1 ", document);
diff --git
a/apache-rat-core/src/test/java/org/apache/rat/ReporterTestUtils.java
b/apache-rat-core/src/test/java/org/apache/rat/ReporterTestUtils.java
index 123ee314..068d0422 100644
--- a/apache-rat-core/src/test/java/org/apache/rat/ReporterTestUtils.java
+++ b/apache-rat-core/src/test/java/org/apache/rat/ReporterTestUtils.java
@@ -24,13 +24,15 @@ import org.apache.rat.report.claim.ClaimStatistic;
/**
* Utilities to help analyze report test output.
*/
-public class ReporterTestUtils {
+public final class ReporterTestUtils {
/** The default license output for an unknown license */
public static final String UNKNOWN_LICENSE = licenseOut("?????", "Unknown
license (Unapproved)");
/** The default license output for an Apache 2 license */
public static final String APACHE_LICENSE = licenseOut("AL", "AL", "Apache
License Version 2.0");
+ private ReporterTestUtils() {
+ }
/**
* Generates the regex string for a document output line. Suitable for
regex query.
* @param approved True if this license is approved
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index cee0945f..ef72932a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -72,6 +72,9 @@ The <action> type attribute can be one of:
</release>
-->
<release version="0.17-SNAPSHOT" date="xxxx-yy-zz" description="Current
SNAPSHOT - release to be done">
+ <action issue="RAT-41" type="fix" dev="claudenw">
+ Added core integration tests and verified results without generating
output via ClaimStatistics.
+ </action>
<action issue="RAT-81" type="add" dev="claudenw">
Added encoding information of the file being read to the RAT report in
case of STANDARD document files.
Added media type attribute in report for all files.