creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1548705 - /creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java
Date Fri, 06 Dec 2013 19:52:02 GMT
Author: rdonkin
Date: Fri Dec  6 19:52:02 2013
New Revision: 1548705

URL: http://svn.apache.org/r1548705
Log:
Apply PMD Rules.

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=1548705&r1=1548704&r2=1548705&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 19:52:02 2013
@@ -59,7 +59,8 @@ public class CDDL1LicenseTest {
     public static void initLicencesUnderTest() {
         licenseStringMap = new HashMap<IHeaderMatcher, String>();
         licenseStringMap.put(new CDDL1License(), LICENSE_LINE);
-        assertEquals(1, licenseStringMap.entrySet().size());
+        assertEquals("Must be One element", 1, licenseStringMap.entrySet()
+				.size());
     }
 
     @Before
@@ -69,24 +70,21 @@ public class CDDL1LicenseTest {
 
     @Test
     public void testNegativeMatches() throws Exception {
-        for (Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet())
{
-            assertFalse(licenceUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor
fear the sight,)"));
-        }
+    	for (Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap
+				.entrySet()) {
+			assertFalse(
+					"Not Matches the  CDDL1 License",
+					licenceUnderTest.getKey().match(subject,
+							"'Behold, Telemachus! (nor fear the sight,)"));
+		}
     }
 
     @Test
     public void testPositiveMatchInDocument() throws Exception {
-        for (Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet())
{
-            assertTrue(licenceUnderTest.getKey().match(subject, "\t" + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "     " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " * " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " // " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /* " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /** " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "    " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue()
+ " ##"));
+    	for (Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet())
{
+			assertTrue("Not Matches the  CDDL1 License", licenceUnderTest
+					.getKey()
+					.match(subject, "\t" + licenceUnderTest.getValue()));
         }
     }
 }



Mime
View raw message