creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1548621 - /creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.java
Date Fri, 06 Dec 2013 17:54:29 GMT
Author: rdonkin
Date: Fri Dec  6 17:54:29 2013
New Revision: 1548621

URL: http://svn.apache.org/r1548621
Log:
Add test: testHasFullText

Modified:
    creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.java

Modified: creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.java?rev=1548621&r1=1548620&r2=1548621&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/AppliedApacheSoftwareLicense20Test.java
Fri Dec  6 17:54:29 2013
@@ -26,6 +26,8 @@ import java.io.StringReader;
 import java.io.IOException;
 
 import org.apache.rat.api.Document;
+import org.apache.rat.api.MetaData;
+import org.apache.rat.api.MetaData.Datum;
 import org.apache.rat.document.MockLocation;
 import org.apache.rat.test.utils.Resources;
 import org.junit.Assert;
@@ -112,5 +114,19 @@ public class AppliedApacheSoftwareLicens
 	public void testHasCopyrightPattern() {
 		assertTrue("copyrightPattern not null", license.hasCopyrightPattern());
 	}
+	
+	@Test
+	public void testHasFullText() {
+		Datum licenseFamilyCategory = new Datum(
+				MetaData.RAT_URL_LICENSE_FAMILY_CATEGORY,
+				MetaData.RAT_URL_LICENSE_FAMILY_CATEGORY);
+		Datum licenseFamilyName = new Datum(
+				MetaData.RAT_URL_LICENSE_FAMILY_NAME,
+				MetaData.RAT_URL_LICENSE_FAMILY_NAME);
+		String fullText = "";
+		FullTextMatchingLicense fullTextMatchingLicense = new FullTextMatchingLicense(
+				licenseFamilyCategory, licenseFamilyName, null, fullText);
+		assertTrue("fullText not null", fullTextMatchingLicense.hasFullText());
+	}
 
 }



Mime
View raw message