#450 Make reload & messages functionality use NewSetting

- Change ReloadCommand to use the new setting functionality
- Check and construct the messages file in NewSetting
- Unrelated: change MessagesManager not to extend CustomConfiguration anymore
This commit is contained in:
ljacqu
2016-01-31 09:55:02 +01:00
parent 059175f14e
commit e747dfeb7f
11 changed files with 185 additions and 123 deletions
@@ -2,6 +2,7 @@ package fr.xephi.authme.settings;
import fr.xephi.authme.settings.domain.Property;
import fr.xephi.authme.settings.properties.TestConfiguration;
import fr.xephi.authme.settings.propertymap.PropertyMap;
import org.bukkit.configuration.file.YamlConfiguration;
import org.junit.Test;
import org.mockito.invocation.InvocationOnMock;
@@ -40,7 +41,7 @@ public class NewSettingTest {
setReturnValue(file, TestConfiguration.SYSTEM_NAME, "myTestSys");
// when / then
NewSetting settings = new NewSetting(file, new File("conf.txt"), null);
NewSetting settings = new NewSetting(file, new File("conf.txt"), (PropertyMap) null);
assertThat(settings.getProperty(TestConfiguration.VERSION_NUMBER), equalTo(20));
assertThat(settings.getProperty(TestConfiguration.SKIP_BORING_FEATURES), equalTo(true));