Author: britter
Date: Mon Apr  8 18:23:32 2013
New Revision: 1465705

URL: http://svn.apache.org/r1465705
Log:
Express intention of tokens in token content and give test more structure

Modified:
    
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java

Modified: 
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java?rev=1465705&r1=1465704&r2=1465705&view=diff
==============================================================================
--- 
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java 
(original)
+++ 
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java 
Mon Apr  8 18:23:32 2013
@@ -60,16 +60,13 @@ public class CSVLexerTest {
     // Single line (without comment)
     @Test
     public void testIgnoreSurroundingSpacesAreDeleted() throws IOException {
-        final String code = "abc,def, hijk,  lmnop,   qrst,uv ,wxy   ,z , ,";
+        final String code = "noSpaces,  leadingSpaces,trailingSpaces  ,  
surroundingSpaces  ,  ,,";
         final Lexer parser = getLexer(code, 
CSVFormat.newBuilder().withIgnoreSurroundingSpaces(true).build());
-        assertThat(parser.nextToken(new Token()), matches(TOKEN, "abc"));
-        assertThat(parser.nextToken(new Token()), matches(TOKEN, "def"));
-        assertThat(parser.nextToken(new Token()), matches(TOKEN, "hijk"));
-        assertThat(parser.nextToken(new Token()), matches(TOKEN, "lmnop"));
-        assertThat(parser.nextToken(new Token()), matches(TOKEN, "qrst"));
-        assertThat(parser.nextToken(new Token()), matches(TOKEN, "uv"));
-        assertThat(parser.nextToken(new Token()), matches(TOKEN, "wxy"));
-        assertThat(parser.nextToken(new Token()), matches(TOKEN, "z"));
+        assertThat(parser.nextToken(new Token()), matches(TOKEN, "noSpaces"));
+        assertThat(parser.nextToken(new Token()), matches(TOKEN, 
"leadingSpaces"));
+        assertThat(parser.nextToken(new Token()), matches(TOKEN, 
"trailingSpaces"));
+        assertThat(parser.nextToken(new Token()), matches(TOKEN, 
"surroundingSpaces"));
+        assertThat(parser.nextToken(new Token()), matches(TOKEN, ""));
         assertThat(parser.nextToken(new Token()), matches(TOKEN, ""));
         assertThat(parser.nextToken(new Token()), matches(EOF, ""));
     }


Reply via email to