Skip to content

Commit

Permalink
Move all test cases into the folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Feliciano Long committed Jun 3, 2016
1 parent 06bd561 commit 1cddbd3
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions src/test/java/moe/imvery/utils/xlsx2json/ExcelParserMainTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ public class ExcelParserMainTest {

@Test
public void main() throws Exception {
ExcelParserMain.main(new String[]{"test.xlsx", "map", "true"});
ExcelParserMain.main(new String[]{"testcases/test.xlsx", "map", "true"});

Path path = Paths.get("test.json");
Path path = Paths.get("testcases/test.json");
BufferedReader reader = Files.newBufferedReader(path);
String jsonText = reader.readLine();

path = Paths.get("test3.expected.json");
path = Paths.get("testcases/test3.expected.json");
reader = Files.newBufferedReader(path);
String expected = reader.readLine();

Expand All @@ -32,13 +32,13 @@ public void main() throws Exception {

@Test
public void mainMultisheets() throws Exception {
ExcelParserMain.main(new String[]{"test.xlsx", "weaponStuffs skillStuffs essenceStuffs", "true"});
ExcelParserMain.main(new String[]{"testcases/test.xlsx", "weaponStuffs skillStuffs essenceStuffs", "true"});

Path path = Paths.get("test.json");
Path path = Paths.get("testcases/test.json");
BufferedReader reader = Files.newBufferedReader(path);
String jsonText = reader.readLine();

path = Paths.get("test4.expected.json");
path = Paths.get("testcases/test4.expected.json");
reader = Files.newBufferedReader(path);
String expected = reader.readLine();

Expand All @@ -47,13 +47,13 @@ public void mainMultisheets() throws Exception {

@Test
public void mainHideSheetName() throws Exception {
ExcelParserMain.main(new String[]{"test.xlsx", "map", "false"});
ExcelParserMain.main(new String[]{"testcases/test.xlsx", "map", "false"});

Path path = Paths.get("test.json");
Path path = Paths.get("testcases/test.json");
BufferedReader reader = Files.newBufferedReader(path);
String jsonText = reader.readLine();

path = Paths.get("test5.expected.json");
path = Paths.get("testcases/test5.expected.json");
reader = Files.newBufferedReader(path);
String expected = reader.readLine();

Expand All @@ -62,13 +62,13 @@ public void mainHideSheetName() throws Exception {

@Test
public void mainMultiSheetsAndHideSheetName() throws Exception {
ExcelParserMain.main(new String[]{"test.xlsx", "map monster", "false"});
ExcelParserMain.main(new String[]{"testcases/test.xlsx", "map monster", "false"});

Path path = Paths.get("test.json");
Path path = Paths.get("testcases/test.json");
BufferedReader reader = Files.newBufferedReader(path);
String jsonText = reader.readLine();

path = Paths.get("test6.expected.json");
path = Paths.get("testcases/test6.expected.json");
reader = Files.newBufferedReader(path);
String expected = reader.readLine();

Expand Down
6 changes: 3 additions & 3 deletions src/test/java/moe/imvery/utils/xlsx2json/ExcelParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class ExcelParserTest {

@Test
public void parseSheetWithAllBasicTypes() throws Exception {
String fileName = "test";
String fileName = "testcases/test";
File excelFile = new File(fileName + ".xlsx");

try(FileInputStream inp = new FileInputStream( excelFile )) {
Expand All @@ -47,7 +47,7 @@ public void parseSheetWithAllBasicTypes() throws Exception {

@Test
public void parseSheetWithArrays() throws Exception {
String fileName = "test";
String fileName = "testcases/test";
File excelFile = new File(fileName + ".xlsx");

try(FileInputStream inp = new FileInputStream( excelFile )) {
Expand All @@ -73,7 +73,7 @@ public void parseSheetWithArrays() throws Exception {

@Test
public void parseSheetWithObjectAndReference() throws Exception {
String fileName = "test";
String fileName = "testcases/test";
File excelFile = new File(fileName + ".xlsx");

try(FileInputStream inp = new FileInputStream( excelFile )) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1cddbd3

Please sign in to comment.