use of net.playeranalytics.plugin.server.PluginLogger in project Plan by plan-player-analytics.
the class ConfigUpdaterTest method prepareConfigFiles.
@BeforeAll
static void prepareConfigFiles() throws URISyntaxException, IOException {
oldConfig = tempDir.resolve("config.yml").toFile();
File configResource = TestResources.getTestResourceFile("config/4.5.2-config.yml", ConfigUpdater.class);
Files.copy(configResource.toPath(), oldConfig.toPath(), StandardCopyOption.REPLACE_EXISTING);
oldBungeeConfig = tempDir.resolve("bungeeconfig.yml").toFile();
File bungeeConfigResource = TestResources.getTestResourceFile("config/4.5.2-bungeeconfig.yml", ConfigUpdater.class);
Files.copy(bungeeConfigResource.toPath(), oldBungeeConfig.toPath(), StandardCopyOption.REPLACE_EXISTING);
newConfig = tempDir.resolve("newconfig.yml");
TestResources.copyResourceIntoFile(newConfig.toFile(), "/assets/plan/config.yml");
newBungeeConfig = tempDir.resolve("newbungeeconfig.yml");
TestResources.copyResourceIntoFile(newBungeeConfig.toFile(), "/assets/plan/bungeeconfig.yml");
PluginLogger testLogger = new TestPluginLogger();
errorLogger = Mockito.mock(ErrorLogger.class);
UNDER_TEST = new ConfigUpdater(testLogger, errorLogger);
}
Aggregations