Author: rdonkin
Date: Fri Dec  6 20:45:40 2013
New Revision: 1548719

URL: http://svn.apache.org/r1548719
Log:
Add test testNegativeMatchCDDL1LicenseEmptyPattern

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

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java?rev=1548719&r1=1548718&r2=1548719&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java
 Fri Dec  6 20:45:40 2013
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertTru
 import java.util.HashMap;
 import java.util.Map;
 import org.apache.rat.analysis.IHeaderMatcher;
+import org.apache.rat.analysis.license.CDDL1License;
 import org.apache.rat.api.Document;
 import org.apache.rat.document.MockLocation;
 import org.junit.Before;
@@ -78,6 +79,14 @@ public class CDDL1LicenseTest {
                                                        "'Behold, Telemachus! 
(nor fear the sight,)"));
                }
     }
+    
+       @Test
+       public void testNegativeMatchCDDL1LicenseEmptyPattern() throws 
Exception {
+               CDDL1License licenseCDDL1 = new CDDL1License();
+               licenseCDDL1.setPatterns(new String[0]);
+               assertFalse("Not Matches the  CDDL1 License", 
licenseCDDL1.match(
+                               subject, "'Behold, Telemachus! (nor fear the 
sight,)"));
+       }
 
     @Test
     public void testPositiveMatchCDDL1License() throws Exception {


Reply via email to