Author: rdonkin
Date: Fri Dec  6 19:48:22 2013
New Revision: 1548698

URL: http://svn.apache.org/r1548698
Log:
Add test: testGPL1Notes, testGPL1Category, testGPL1Name, testGPL2Notes, 
testGPL2Category, testGPL2Name, testGPL3Notes, testGPL3Category, testGPL3Name

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

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java?rev=1548698&r1=1548697&r2=1548698&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java
 Fri Dec  6 19:48:22 2013
@@ -18,7 +18,9 @@
  */
 package org.apache.rat.analysis.license;
 
+import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
 import java.util.HashMap;
@@ -75,5 +77,59 @@ public class GPL123LicenseTest {
                                        .match(subject, "\t" + 
licenceUnderTest.getValue()));
                }
        }
+       
+       @Test
+       public void testGPL1Notes() {
+               assertThat(
+                               new GPL1License().getNotes(),
+                               is("Note that GPL1 requires a NOTICE. All 
modifications require notes. See http://www.gnu.org/licenses/gpl-1.0.html.";));
+       }
+
+       @Test
+       public void testGPL1Category() {
+               assertThat(new GPL1License().getLicenseFamilyCategory(), 
is("GPL1 "));
+       }
+
+       @Test
+       public void testGPL1Name() {
+               assertThat(new GPL1License().getLicenseFamilyName(),
+                               is("GNU General Public License, version 1"));
+       }
+
+       @Test
+       public void testGPL2Notes() {
+               assertThat(
+                               new GPL2License().getNotes(),
+                               is("Note that GPL2 requires a NOTICE. All 
modifications require notes. See http://www.gnu.org/licenses/gpl-2.0.html.";));
+       }
+
+       @Test
+       public void testGPL2Category() {
+               assertThat(new GPL2License().getLicenseFamilyCategory(), 
is("GPL2 "));
+       }
+
+       @Test
+       public void testGPL2Name() {
+               assertThat(new GPL2License().getLicenseFamilyName(),
+                               is("GNU General Public License, version 2"));
+       }
+
+       @Test
+       public void testGPL3Notes() {
+               assertThat(
+                               new GPL3License().getNotes(),
+                               is("Note that GPL3 requires a NOTICE. All 
modifications require notes. See http://www.gnu.org/licenses/gpl-3.0.html.";));
+       }
+
+       @Test
+       public void testGPL3Category() {
+               assertThat(new GPL3License().getLicenseFamilyCategory(), 
is("GPL3 "));
+       }
+
+       @Test
+       public void testGPL3Name() {
+               assertThat(new GPL3License().getLicenseFamilyName(),
+                               is("GNU General Public License, version 3"));
+       }
 
 }


Reply via email to