Fix PlanConfig constructor usage in tests

This commit is contained in:
Rsl1122 2019-02-28 17:52:05 +02:00
parent be8a3b484f
commit 93e7410ad2
2 changed files with 6 additions and 5 deletions

View File

@ -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;
}

View File

@ -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);