Skip to content

Commit 455b5ee

Browse files
committed
Added unit test for splitting tables
1 parent f1877a3 commit 455b5ee

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/test/java/com/ffxivcensus/gatherer/ConsoleTest.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public void testConsoleFullOptions() throws Exception {
162162
@Test
163163
public void TestConsoleHelpDefault() throws Exception{
164164

165-
String strHelp = "usage: java -jar XIVStats-Gatherer-Java.jar [-bmqvFPS] -s startid -f";
165+
String strHelp = "usage: java -jar XIVStats-Gatherer-Java.jar [-bmqvxFPS] -s startid -f";
166166

167167
//Test for a help dialog displayed upon failure
168168
String[] args = {""};
@@ -174,7 +174,7 @@ public void TestConsoleHelpDefault() throws Exception{
174174
@Test
175175
public void TestConsoleHelpOnFail() throws Exception{
176176

177-
String strHelp = "usage: java -jar XIVStats-Gatherer-Java.jar [-bmqvFPS] -s startid -f";
177+
String strHelp = "usage: java -jar XIVStats-Gatherer-Java.jar [-bmqvxFPS] -s startid -f";
178178
//Test for a help dialog displayed upon failure
179179
String[] args = {"-s 0"};
180180
GathererController gc = Console.run(args);
@@ -186,7 +186,7 @@ public void TestConsoleHelpOnFail() throws Exception{
186186
@Test
187187
public void TestConsoleHelp() throws Exception{
188188

189-
String strHelp = "usage: java -jar XIVStats-Gatherer-Java.jar [-bmqvFPS] -s startid -f";
189+
String strHelp = "usage: java -jar XIVStats-Gatherer-Java.jar [-bmqvxFPS] -s startid -f";
190190

191191
//First test for a user requested help dialog
192192
String[] args = {"--help"};
@@ -220,6 +220,14 @@ public void testPrintFails(){
220220
assertTrue(outContent.toString().contains("does not exist."));
221221
}
222222

223+
@Test
224+
public void testSplitTables(){
225+
String[] args = {"-s","900","-f","1000","-x","_test","-S"};
226+
GathererController gc = Console.run(args);
227+
assertTrue(gc.isSplitTables());
228+
assertEquals(gc.getTableSuffix(),"_test");
229+
}
230+
223231
//Utility methods
224232

225233
/**

0 commit comments

Comments
 (0)