Author: scottbw
Date: Wed Oct  5 10:03:49 2011
New Revision: 1179133

URL: http://svn.apache.org/viewvc?rev=1179133&view=rev
Log:
Added more javadoc comments

Modified:
    
incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/ContentTypeUtilsTest.java
    
incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/FormattingUtilsTest.java
    
incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/IRIValidatorTest.java

Modified: 
incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/ContentTypeUtilsTest.java
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/ContentTypeUtilsTest.java?rev=1179133&r1=1179132&r2=1179133&view=diff
==============================================================================
--- 
incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/ContentTypeUtilsTest.java
 (original)
+++ 
incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/ContentTypeUtilsTest.java
 Wed Oct  5 10:03:49 2011
@@ -23,14 +23,23 @@ import java.io.IOException;
 import org.apache.wookie.w3c.util.ContentTypeUtils;
 import org.junit.Test;
 
+/**
+ * Test cases for content-type handling
+ */
 public class ContentTypeUtilsTest extends ContentTypeUtils {
        
+  /**
+   * Test that we can instantiate the ContentTypeUtils class
+   */
        @Test
        public void classTest(){
                @SuppressWarnings("unused")
                ContentTypeUtils test = new ContentTypeUtils();
        }
        
+       /**
+        * Checking whether null is a supported file type should return False 
+        */
        @Test
        public void Nulls(){
                File nullFile = null;
@@ -39,11 +48,19 @@ public class ContentTypeUtilsTest extend
                assertFalse(ContentTypeUtils.isSupportedImageType(nullString));
        }
        
+       /**
+        * Checking whether an empty string is a supported file type should 
return False
+        */
        @Test
        public void Empty(){
                assertFalse(ContentTypeUtils.isSupportedImageType(""));
        }
        
+       /**
+        * Test the behaviour of file names with different kinds of dot 
placement. Only the
+        * final file extension should matter - the utils should ignore any 
dots elsewhere in
+        * the file name
+        */
        @Test
        public void Dots(){
                assertFalse(ContentTypeUtils.isSupportedImageType(".\\."));
@@ -66,6 +83,9 @@ public class ContentTypeUtilsTest extend
                assertFalse(ContentTypeUtils.isSupportedImageType(new 
File("test.png.")));
        }
 
+       /**
+        * Tests for positives on supported types
+        */
        @Test
        public void Types(){
                assertTrue(ContentTypeUtils.isSupportedImageType("test.gif"));
@@ -75,6 +95,9 @@ public class ContentTypeUtilsTest extend
                assertTrue(ContentTypeUtils.isSupportedImageType("test.ico"));
        }
        
+       /**
+        * Tests for negatives on some definitely unsupported types
+        */
        @Test
        public void Types2(){
                assertFalse(ContentTypeUtils.isSupportedImageType("test.exe"));
@@ -91,6 +114,9 @@ public class ContentTypeUtilsTest extend
                assertFalse(ContentTypeUtils.isSupportedImageType("test.xht"));
        }
        
+       /**
+        * Test with invalid characters in file extensions
+        */
        @Test
        public void InvalidExtensions(){
                assertFalse(ContentTypeUtils.isSupportedImageType("test.1exe"));
@@ -100,6 +126,10 @@ public class ContentTypeUtilsTest extend
                assertFalse(ContentTypeUtils.isSupportedImageType("test.pñg"));
        }
        
+       /**
+        * Test the content type sniffer correctly identifies the types of 
files without an extension
+        * @throws IOException
+        */
        @Test
        public void sniff() throws IOException{
                

Modified: 
incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/FormattingUtilsTest.java
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/FormattingUtilsTest.java?rev=1179133&r1=1179132&r2=1179133&view=diff
==============================================================================
--- 
incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/FormattingUtilsTest.java
 (original)
+++ 
incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/FormattingUtilsTest.java
 Wed Oct  5 10:03:49 2011
@@ -23,8 +23,6 @@ import org.junit.Test;
  * Tests for some simple cases of encoding text containing direction 
instructions
  * 
  * Some of these tests are derived from examples ones used in 
http://dev.w3.org/2006/waf/widgets-api/#getting-localizable-strings-
- * 
- * @author [email protected]
  *
  */
 public class FormattingUtilsTest {

Modified: 
incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/IRIValidatorTest.java
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/IRIValidatorTest.java?rev=1179133&r1=1179132&r2=1179133&view=diff
==============================================================================
--- 
incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/IRIValidatorTest.java
 (original)
+++ 
incubator/wookie/trunk/parser/java/src-test/org/apache/wookie/w3c/test/IRIValidatorTest.java
 Wed Oct  5 10:03:49 2011
@@ -19,7 +19,9 @@ import static org.junit.Assert.assertTru
 import org.apache.wookie.w3c.util.IRIValidator;
 import org.junit.Test;
 
-
+/**
+ * Test the IRI Validator behaves correctly according to the IRI spec
+ */
 public class IRIValidatorTest {
        
        @Test


Reply via email to