mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-03-07 17:28:03 +08:00
Fix PlanConfig constructor usage in tests
This commit is contained in:
parent
be8a3b484f
commit
93e7410ad2
@ -19,6 +19,7 @@ package com.djrapitops.plan.system.settings;
|
||||
import com.djrapitops.plan.system.settings.config.PlanConfig;
|
||||
import com.djrapitops.plan.system.settings.paths.*;
|
||||
import com.djrapitops.plan.system.settings.paths.key.Setting;
|
||||
import com.djrapitops.plugin.logging.console.TestPluginLogger;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
@ -134,7 +135,7 @@ public class ConfigSettingKeyTest {
|
||||
}
|
||||
|
||||
private PlanConfig createConfig(File configFile) throws IOException {
|
||||
PlanConfig config = new PlanConfig(configFile, null, logger);
|
||||
PlanConfig config = new PlanConfig(configFile, null, new TestPluginLogger());
|
||||
config.save();
|
||||
return config;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ class ConfigUpdaterTest {
|
||||
Path config = tempDir.resolve("oldconfig.yml");
|
||||
Files.copy(oldConfig.toPath(), config, StandardCopyOption.REPLACE_EXISTING);
|
||||
|
||||
PlanConfig planConfig = new PlanConfig(config.toFile(), null, logger);
|
||||
PlanConfig planConfig = new PlanConfig(config.toFile(), null, new TestPluginLogger());
|
||||
|
||||
UNDER_TEST.applyConfigUpdate(planConfig);
|
||||
|
||||
@ -100,7 +100,7 @@ class ConfigUpdaterTest {
|
||||
Path config = tempDir.resolve("oldconfig.yml");
|
||||
Files.copy(oldBungeeConfig.toPath(), config, StandardCopyOption.REPLACE_EXISTING);
|
||||
|
||||
PlanConfig planConfig = new PlanConfig(config.toFile(), null, logger);
|
||||
PlanConfig planConfig = new PlanConfig(config.toFile(), null, new TestPluginLogger());
|
||||
|
||||
UNDER_TEST.applyConfigUpdate(planConfig);
|
||||
|
||||
@ -122,7 +122,7 @@ class ConfigUpdaterTest {
|
||||
Path config = tempDir.resolve("oldconfig.yml");
|
||||
Files.copy(oldConfig.toPath(), config, StandardCopyOption.REPLACE_EXISTING);
|
||||
|
||||
PlanConfig planConfig = new PlanConfig(config.toFile(), null, logger);
|
||||
PlanConfig planConfig = new PlanConfig(config.toFile(), null, new TestPluginLogger());
|
||||
|
||||
ConfigChange[] changes = UNDER_TEST.configEnhancementPatch();
|
||||
assertMoveChangesAreAppliedProperly(planConfig, changes);
|
||||
@ -133,7 +133,7 @@ class ConfigUpdaterTest {
|
||||
Path config = tempDir.resolve("oldconfig.yml");
|
||||
Files.copy(oldBungeeConfig.toPath(), config, StandardCopyOption.REPLACE_EXISTING);
|
||||
|
||||
PlanConfig planConfig = new PlanConfig(config.toFile(), null, logger);
|
||||
PlanConfig planConfig = new PlanConfig(config.toFile(), null, new TestPluginLogger());
|
||||
|
||||
ConfigChange[] changes = UNDER_TEST.configEnhancementPatch();
|
||||
assertMoveChangesAreAppliedProperly(planConfig, changes);
|
||||
|
Loading…
Reference in New Issue
Block a user