creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1549244 - /creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/header/HeaderMatcherTest.java
Date Sun, 08 Dec 2013 21:03:07 GMT
Author: rdonkin
Date: Sun Dec  8 21:03:06 2013
New Revision: 1549244

URL: http://svn.apache.org/r1549244
Log:
Add java doc.

Modified:
    creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/header/HeaderMatcherTest.java

Modified: creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/header/HeaderMatcherTest.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/header/HeaderMatcherTest.java?rev=1549244&r1=1549243&r2=1549244&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/header/HeaderMatcherTest.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/header/HeaderMatcherTest.java
Sun Dec  8 21:03:06 2013
@@ -18,22 +18,36 @@
  */
 package org.apache.rat.header;
 
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.io.StringReader;
 import java.util.regex.Pattern;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import org.junit.Before;
+import org.junit.Test;
 
+/**
+ * The Class HeaderMatcherTest.
+ */
 public class HeaderMatcherTest {
 
+	/** The capacity. */
 	int capacity;
+
+	/** The matcher. */
 	HeaderMatcher matcher;
+
+	/** The filter. */
 	SimpleCharFilter filter;
 
+	/**
+	 * Sets the up.
+	 * 
+	 * @throws Exception
+	 *             the exception
+	 */
 	@Before
 	public void setUp() throws Exception {
 		capacity = 20;
@@ -41,6 +55,12 @@ public class HeaderMatcherTest {
 		matcher = new HeaderMatcher(filter, 20);
 	}
 
+	/**
+	 * Simple matches.
+	 * 
+	 * @throws Exception
+	 *             the exception
+	 */
 	@Test
 	public void simpleMatches() throws Exception {
 		Pattern hatPattern = Pattern.compile("(.*)hat(.*)");
@@ -55,6 +75,12 @@ public class HeaderMatcherTest {
 		assertTrue(matcher.matches(headPattern));
 	}
 
+	/**
+	 * Filtered matches.
+	 * 
+	 * @throws Exception
+	 *             the exception
+	 */
 	@Test
 	public void filteredMatches() throws Exception {
 		Pattern capPattern = Pattern.compile("cap(.*)");
@@ -67,6 +93,12 @@ public class HeaderMatcherTest {
 		assertFalse(matcher.matches(capPattern));
 	}
 
+	/**
+	 * No lines.
+	 * 
+	 * @throws Exception
+	 *             the exception
+	 */
 	@Test
 	public void noLines() throws Exception {
 		StringReader reader = new StringReader("None");
@@ -74,6 +106,12 @@ public class HeaderMatcherTest {
 		assertEquals("No lines read", 0, matcher.lines());
 	}
 
+	/**
+	 * Lines.
+	 * 
+	 * @throws Exception
+	 *             the exception
+	 */
 	@Test
 	public void lines() throws Exception {
 		StringReader reader = new StringReader("One\n");
@@ -90,6 +128,12 @@ public class HeaderMatcherTest {
 		assertEquals("Three lines read", 3, matcher.lines());
 	}
 
+	/**
+	 * Too many lines.
+	 * 
+	 * @throws Exception
+	 *             the exception
+	 */
 	@Test
 	public void tooManyLines() throws Exception {
 		StringReader reader = new StringReader(



Mime
View raw message