Search in sources :

Example 1 with PluginLogger

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);
}
Also used : TestPluginLogger(utilities.TestPluginLogger) File(java.io.File) PluginLogger(net.playeranalytics.plugin.server.PluginLogger) TestPluginLogger(utilities.TestPluginLogger) ErrorLogger(com.djrapitops.plan.utilities.logging.ErrorLogger) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

ErrorLogger (com.djrapitops.plan.utilities.logging.ErrorLogger)1 File (java.io.File)1 PluginLogger (net.playeranalytics.plugin.server.PluginLogger)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1 TestPluginLogger (utilities.TestPluginLogger)1