Author: rdonkin
Date: Mon Dec  9 05:36:45 2013
New Revision: 1549396

URL: http://svn.apache.org/r1549396
Log:
Add Test: testStandardReportWithLicenses

Modified:
    
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/xml/XmlReportFactoryTest.java

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/xml/XmlReportFactoryTest.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/xml/XmlReportFactoryTest.java?rev=1549396&r1=1549395&r2=1549396&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/xml/XmlReportFactoryTest.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/xml/XmlReportFactoryTest.java
 Mon Dec  9 05:36:45 2013
@@ -35,6 +35,7 @@ import org.apache.rat.report.xml.writer.
 import org.apache.rat.report.xml.writer.impl.base.XmlWriter;
 import org.apache.rat.test.utils.Resources;
 import org.apache.rat.walker.DirectoryWalker;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -73,8 +74,8 @@ public class XmlReportFactoryTest {
         *            the directory
         * @param report
         *            the report
-        * @throws RatException
-        *             the rat exception
+        * @throws IOException
+        *             Signals that an I/O exception has occurred.
         */
        private void report(final DirectoryWalker directory, final RatReport 
report)
                        throws IOException {
@@ -84,8 +85,6 @@ public class XmlReportFactoryTest {
        /**
         * Standard report.
         * 
-        * @throws RatException
-        *             the rat exception
         * @throws IOException
         *             Signals that an I/O exception has occurred.
         */
@@ -167,4 +166,22 @@ public class XmlReportFactoryTest {
                                statistic.getDocumentCategoryMap().get(
                                                
MetaData.RAT_DOCUMENT_CATEGORY_VALUE_ARCHIVE));
        }
+
+       /**
+        * Test standard report with licenses.
+        * 
+        * @throws IOException
+        *             Signals that an I/O exception has occurred.
+        */
+       @Test
+       public void testStandardReportWithLicenses() throws IOException {
+               final MockLicenseMatcher mockLicenseMatcher = new 
MockLicenseMatcher();
+               final ClaimStatistic statistic = new ClaimStatistic();
+               final ReportConfiguration configuration = new 
ReportConfiguration();
+               configuration.setHeaderMatcher(mockLicenseMatcher);
+               configuration.setAddingLicenses(true);
+               RatReport report = new 
XmlReportFactory().createStandardReport(writer,
+                               statistic, configuration);
+               Assert.assertNotNull(report);
+       }
 }


Reply via email to