| 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 CompassToSurvexTest { |
| 43 |
|
| 44 |
@Test |
| 45 |
public void testCompassToSurvexMinimal() throws ParseException, FileNotFoundException { |
| 46 |
|
| 47 |
String fileCompare = RunFileConverter.convertCompassToSurvex( "Minimal", CmdlineSplaysOpt.Default, CmdlineOpt.F, |
| 48 |
RunFileConverter.defaultCharset ); |
| 49 |
assertEquals("Comparing Minimal survex file from Compass with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 50 |
} |
| 51 |
|
| 52 |
@Test |
| 53 |
public void testCompassToSurvexCalTest() throws ParseException, FileNotFoundException { |
| 54 |
|
| 55 |
String fileCompare = RunFileConverter.convertCompassToSurvex( "CalTest", CmdlineSplaysOpt.Default, CmdlineOpt.F, |
| 56 |
RunFileConverter.defaultCharset ); |
| 57 |
assertEquals("Comparing CalTest survex file from Compass with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 58 |
} |
| 59 |
|
| 60 |
@Test |
| 61 |
public void testCompassToSurvexOldHeadersTest() throws ParseException, FileNotFoundException { |
| 62 |
|
| 63 |
String fileCompare = RunFileConverter.convertCompassToSurvex( "OldCompassHeaders", CmdlineSplaysOpt.Default, CmdlineOpt.F, |
| 64 |
RunFileConverter.defaultCharset ); |
| 65 |
assertEquals("Comparing OldCompassHeaders survex file from Compass with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 66 |
} |
| 67 |
|
| 68 |
@Test |
| 69 |
public void testCompassToSurvexAwkwardCharsANSITest() throws ParseException, FileNotFoundException { |
| 70 |
|
| 71 |
String fileCompare = RunFileConverter.convertCompassToSurvex( "AwkwardCharsANSI", CmdlineSplaysOpt.Default, CmdlineOpt.F, |
| 72 |
"Cp1252" ); |
| 73 |
assertEquals("Comparing AwkwardChars survex file from ANSI Compass with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 74 |
} |
| 75 |
|
| 76 |
@Test |
| 77 |
public void testCompassToSurvexAwkwardCharsUTF8Test() throws ParseException, FileNotFoundException { |
| 78 |
|
| 79 |
String fileCompare = RunFileConverter.convertCompassToSurvex( "AwkwardCharsUTF8", CmdlineSplaysOpt.Default, CmdlineOpt.F, |
| 80 |
"UTF8" ); |
| 81 |
assertEquals("Comparing AwkwardChars survex file from UTF8 Compass with reference.", DiffFiles.FILES_IDENTICAL, fileCompare); |
| 82 |
} |
| 83 |
|
| 84 |
} |