Permalink
Browse files

more chunker tests

  • Loading branch information...
1 parent c737e9e commit 025b823213d648dea0ccbac2a86646ee25ea3c71 @jexp committed Mar 11, 2013
Showing with 12 additions and 2 deletions.
  1. +1 −1 pom.xml
  2. +11 −1 src/test/java/org/neo4j/batchimport/utils/ChunkerTest.java
View
@@ -5,7 +5,7 @@
<version>1.9-SNAPSHOT</version>
<name>Neo4j Batch Importer</name>
<properties>
- <neo4j.version>1.9.M04</neo4j.version>
+ <neo4j.version>1.9.M05</neo4j.version>
</properties>
<repositories>
<repository>
@@ -47,14 +47,24 @@ public void testLineWithFields() throws Exception {
}
@Test
- public void testLineWithEmptyFields() throws Exception {
+ public void testLineWithEmptyField() throws Exception {
Chunker chunker = newChunker("a\t\tb\n");
assertEquals("a", chunker.nextWord());
assertEquals(Chunker.NO_VALUE, chunker.nextWord());
assertEquals("b", chunker.nextWord());
assertEquals(Chunker.EOL, chunker.nextWord());
assertSame(Chunker.EOF, chunker.nextWord());
}
+ @Test
+ public void testLineWithOnlyEmptyFields() throws Exception {
+ Chunker chunker = newChunker("\t\t\t\n");
+ assertEquals(Chunker.NO_VALUE, chunker.nextWord());
+ assertEquals(Chunker.NO_VALUE, chunker.nextWord());
+ assertEquals(Chunker.NO_VALUE, chunker.nextWord());
+ assertEquals(Chunker.NO_VALUE, chunker.nextWord());
+ assertEquals(Chunker.EOL, chunker.nextWord());
+ assertSame(Chunker.EOF, chunker.nextWord());
+ }
@Test
public void testLineWithEmptyLines() throws Exception {

0 comments on commit 025b823

Please sign in to comment.