mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
21.56.2018 0bdefbf053beb80736eff0a13fe8b90618c8d6dc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package de.micromata.borgbutler.config;
 
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.Test;
 
import java.io.File;
import java.io.IOException;
 
public class ConfigHandlerTest {
    @Test
    void readWriteTest() throws IOException {
        File workingDir = ConfigurationHandler.getInstance().getWorkingDir();
        File origConfigFile = new File(workingDir, ".borgbutler-orig.json");
        FileUtils.copyFile(ConfigurationHandler.getInstance().getConfigFile(), origConfigFile);
        ConfigurationHandler.getInstance().save();
        FileUtils.copyFile(origConfigFile, ConfigurationHandler.getInstance().getConfigFile());
    }
}