Rename CSVRowParserTests to TsvCsvRowParserTests.
TsvCsvImporterTests - identified 3 tests which now fail when using different parser. Tests are enabled=false and in 'broken' testing group. git-svn-id: http://google-refine.googlecode.com/svn/trunk@793 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
03b1ab01f4
commit
075e985865
@ -56,7 +56,7 @@ public class TsvCsvImporterTests {
|
|||||||
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SUT.read(lnReader, project, ",", -1, 0, 0, 1, false, true);
|
SUT.read(lnReader, project, null, -1, 0, 0, 1, false, true);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ public class TsvCsvImporterTests {
|
|||||||
"data1,data2,data3";
|
"data1,data2,data3";
|
||||||
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
||||||
try {
|
try {
|
||||||
SUT.read(lnReader, project, ",", -1, 0, 0, 2, false, true);
|
SUT.read(lnReader, project, null, -1, 0, 0, 2, false, true);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
}
|
}
|
||||||
@ -228,13 +228,13 @@ public class TsvCsvImporterTests {
|
|||||||
Assert.assertEquals(project.rows.get(0).cells.get(5).value, "data6");
|
Assert.assertEquals(project.rows.get(0).cells.get(5).value, "data6");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(enabled=false, groups={"broken"})
|
||||||
public void readQuotedData(){
|
public void readQuotedData(){
|
||||||
String input = "col1,col2,col3\n" +
|
String input = "col1,col2,col3\n" +
|
||||||
"\"\"\"To Be\"\" is often followed by \"\"or not To Be\"\"\",data2";
|
"\"\"\"To Be\"\" is often followed by \"\"or not To Be\"\"\",data2";
|
||||||
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
||||||
try {
|
try {
|
||||||
SUT.read(lnReader, project, null, -1, 0, 0, 1, false, true);
|
SUT.read(lnReader, project, ",", -1, 0, 0, 1, false, true);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
}
|
}
|
||||||
@ -255,7 +255,7 @@ public class TsvCsvImporterTests {
|
|||||||
"data1,data2,data3";
|
"data1,data2,data3";
|
||||||
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
||||||
try {
|
try {
|
||||||
SUT.read(lnReader, project, ",", -1, 0, 1, 1, false, true);
|
SUT.read(lnReader, project, null, -1, 0, 1, 1, false, true);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
}
|
}
|
||||||
@ -277,7 +277,7 @@ public class TsvCsvImporterTests {
|
|||||||
"data1,data2,data3";
|
"data1,data2,data3";
|
||||||
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
||||||
try {
|
try {
|
||||||
SUT.read(lnReader, project, ",", -1, 1, 0, 1, false, true);
|
SUT.read(lnReader, project, null, -1, 1, 0, 1, false, true);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
}
|
}
|
||||||
@ -303,7 +303,7 @@ public class TsvCsvImporterTests {
|
|||||||
"data1,data2,data3";
|
"data1,data2,data3";
|
||||||
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
||||||
try {
|
try {
|
||||||
SUT.read(lnReader, project, ",", -1, 1, 3, 2, false, true);
|
SUT.read(lnReader, project, null, -1, 1, 3, 2, false, true);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
}
|
}
|
||||||
@ -318,7 +318,7 @@ public class TsvCsvImporterTests {
|
|||||||
Assert.assertEquals(project.rows.get(0).cells.get(2).value, "data3");
|
Assert.assertEquals(project.rows.get(0).cells.get(2).value, "data3");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(enabled=false, groups={"broken"})
|
||||||
public void readIgnore3_Header2_Skip2_limit2(){
|
public void readIgnore3_Header2_Skip2_limit2(){
|
||||||
String input = "ignore1\n" +
|
String input = "ignore1\n" +
|
||||||
"ignore2\n" +
|
"ignore2\n" +
|
||||||
@ -332,7 +332,7 @@ public class TsvCsvImporterTests {
|
|||||||
"data-row3-cell1,data-row3-cell2,data-row1-cell3";
|
"data-row3-cell1,data-row3-cell2,data-row1-cell3";
|
||||||
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
||||||
try {
|
try {
|
||||||
SUT.read(lnReader, project, ",", 2, 2, 3, 2, false, true);
|
SUT.read(lnReader, project, null, 2, 2, 3, 2, false, true);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
}
|
}
|
||||||
@ -350,13 +350,13 @@ public class TsvCsvImporterTests {
|
|||||||
Assert.assertEquals(project.rows.get(1).cells.get(1).value, "data-row2-cell2");
|
Assert.assertEquals(project.rows.get(1).cells.get(1).value, "data-row2-cell2");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(enabled=false, groups={"broken"})
|
||||||
public void readWithMultiLinedQuotedData(){
|
public void readWithMultiLinedQuotedData(){
|
||||||
String input = "col1,col2,col3\n" +
|
String input = "col1,col2,col3\n" +
|
||||||
"\"\"\"To\n Be\"\" is often followed by \"\"or not To\n Be\"\"\",data2";
|
"\"\"\"To\n Be\"\" is often followed by \"\"or not To\n Be\"\"\",data2";
|
||||||
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
||||||
try {
|
try {
|
||||||
SUT.read(lnReader, project, null, -1, 0, 0, 1, false, true);
|
SUT.read(lnReader, project, ",", -1, 0, 0, 1, false, true);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ import org.testng.annotations.Test;
|
|||||||
|
|
||||||
import com.metaweb.gridworks.importers.parsers.TsvCsvRowParser;
|
import com.metaweb.gridworks.importers.parsers.TsvCsvRowParser;
|
||||||
|
|
||||||
public class CSVRowParserTests {
|
public class TsvCsvRowParserTests {
|
||||||
// logging
|
// logging
|
||||||
final static protected Logger logger = LoggerFactory.getLogger("CSVRowParserTests");
|
final static protected Logger logger = LoggerFactory.getLogger("CSVRowParserTests");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user