| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
package footleg.cavesurvey.regression; |
| 20 |
|
| 21 |
import static org.junit.Assert.*; |
| 22 |
|
| 23 |
import java.io.FileNotFoundException; |
| 24 |
import java.text.ParseException; |
| 25 |
|
| 26 |
import org.junit.Test; |
| 27 |
|
| 28 |
import footleg.cavesurvey.converter.CaveConverter.CmdlineOpt; |
| 29 |
import footleg.cavesurvey.converter.CaveConverter.CmdlineSplaysOpt; |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
public class SurvexToToporobotTest { |
| 43 |
|
| 44 |
@Test |
| 45 |
public void testCrossoverCmdline() throws ParseException, FileNotFoundException { |
| 46 |
|
| 47 |
String fileCompare = RunFileConverter.convertUsingCmdLine("Crossover", 's', 't', ""); |
| 48 |
assertEquals("Comparing Crossover Toporobot file from Survex with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 49 |
} |
| 50 |
|
| 51 |
@Test |
| 52 |
public void testFlagsSplaysCmdline() throws ParseException, FileNotFoundException { |
| 53 |
|
| 54 |
String fileCompare = RunFileConverter.convertUsingCmdLine("flags", 's', 't', "splays"); |
| 55 |
assertEquals("Comparing Flags Toporobot file from Survex with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 56 |
} |
| 57 |
|
| 58 |
@Test |
| 59 |
public void testSwilEnt() throws ParseException, FileNotFoundException { |
| 60 |
|
| 61 |
String fileCompare = RunFileConverter.convertSurvexToTopoRobot( "SwilEnt", CmdlineSplaysOpt.None, CmdlineOpt.T, |
| 62 |
RunFileConverter.defaultCharset ); |
| 63 |
assertEquals("Comparing SwilEnt Toporobot file from Survex with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 64 |
} |
| 65 |
|
| 66 |
@Test |
| 67 |
public void testCaseInsensitive() throws ParseException, FileNotFoundException { |
| 68 |
|
| 69 |
String fileCompare = RunFileConverter.convertSurvexToTopoRobot( "CaseInsensitive", CmdlineSplaysOpt.None, CmdlineOpt.T, |
| 70 |
RunFileConverter.defaultCharset ); |
| 71 |
assertEquals("Comparing CaseInsensitive Toporobot file from Survex with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 72 |
} |
| 73 |
|
| 74 |
} |