Write a settings/config file for use by unit tests. @param configFileName The name of the new config file. @param configFolder The folder in which other settings files will be saved. @param pccLoc The location of the data folder. @throws IOException If the file cannot be written.
(String configFileName, String configFolder, String pccLoc)
| 500 | * @throws IOException If the file cannot be written. |
| 501 | */ |
| 502 | public static void createDummySettingsFile(String configFileName, |
| 503 | String configFolder, String pccLoc) throws IOException |
| 504 | { |
| 505 | File configFile = new File(configFileName); |
| 506 | configFile.deleteOnExit(); |
| 507 | try (BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream( |
| 508 | configFile), StandardCharsets.UTF_8))) |
| 509 | { |
| 510 | bw.write("settingsPath=" + configFolder + "\r\n"); |
| 511 | if (pccLoc != null) |
| 512 | { |
| 513 | LOG.info("Using PCC Location of '" + pccLoc + "'."); |
| 514 | bw.write("pccFilesPath=" + pccLoc + "\r\n"); |
| 515 | } |
| 516 | bw.write("customPath=testsuite\\\\customdata\r\n"); |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | public static void loadGameModes(String testConfigFile) |
| 521 | { |
no test coverage detected