creadur-commits mailing list archives

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

URL: http://svn.apache.org/r1548627
Log:
Rename Test, Only one assert for each test.

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=1548627&r1=1548626&r2=1548627&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 18:00:10 2013
@@ -22,8 +22,8 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertTrue;
 
 import java.io.BufferedReader;
-import java.io.StringReader;
 import java.io.IOException;
+import java.io.StringReader;
 
 import org.apache.rat.api.Document;
 import org.apache.rat.api.MetaData;
@@ -63,8 +63,9 @@ public class AppliedApacheSoftwareLicens
 	}
 
 	@Test
-	public void match() throws IOException {
-		BufferedReader bufferedReader = new BufferedReader(new StringReader(HEADER));
+	public void testMatchAppliedApacheLicense() throws IOException {
+		BufferedReader bufferedReader = new BufferedReader(new StringReader(
+				HEADER));
 		String line = bufferedReader.readLine();
 		boolean result = false;
 		final Document subject = new MockLocation("subject");
@@ -74,12 +75,10 @@ public class AppliedApacheSoftwareLicens
 		}
 		assertTrue("Applied AL2.0 license should be matched", result);
 		license.reset();
-		result = license.match(subject, "New line");
-		assertFalse("After reset, content should build up again", result);
 	}
 
 	@Test
-	public void noMatch() throws IOException {
+	public void testNoMatchAppliedApacheLicense() throws IOException {
 		BufferedReader bufferedReader = Resources
 				.getBufferedResourceReader("elements/Source.java");
 		String line = bufferedReader.readLine();
@@ -104,17 +103,17 @@ public class AppliedApacheSoftwareLicens
 	public void baddFiles() throws IOException {
 		DirectoryScanner.testFilesInDir("appliedAL20/bad", license, false);
 	}
-	
+
 	@Test
 	public void testNotNullCopyRightOwner() {
 		Assert.assertNotNull(license.getCopyRightOwner());
 	}
-	
+
 	@Test
 	public void testHasCopyrightPattern() {
 		assertTrue("copyrightPattern not null", license.hasCopyrightPattern());
 	}
-	
+
 	@Test
 	public void testHasFullText() {
 		Datum licenseFamilyCategory = new Datum(
@@ -128,5 +127,4 @@ public class AppliedApacheSoftwareLicens
 				licenseFamilyCategory, licenseFamilyName, null, fullText);
 		assertTrue("fullText not null", fullTextMatchingLicense.hasFullText());
 	}
-
 }



Mime
View raw message