#927 Integrate ConfigMe into AuthMe (work in progress)

- Replace own code with ConfigMe
This commit is contained in:
ljacqu
2016-08-30 15:28:07 +02:00
parent 33eab1df21
commit c7bb7b460e
44 changed files with 290 additions and 1482 deletions
@@ -2,6 +2,7 @@ package fr.xephi.authme;
import ch.jalu.injector.Injector;
import ch.jalu.injector.InjectorBuilder;
import com.github.authme.configme.resource.PropertyResource;
import com.google.common.io.Files;
import fr.xephi.authme.api.NewAPI;
import fr.xephi.authme.command.CommandHandler;
@@ -35,7 +36,7 @@ import java.io.IOException;
import java.util.logging.Logger;
import static fr.xephi.authme.settings.TestSettingsMigrationServices.alwaysFulfilled;
import static fr.xephi.authme.settings.properties.SettingsFieldRetriever.getAllPropertyFields;
import static fr.xephi.authme.settings.properties.AuthMeSettingsRetriever.getAllPropertyFields;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.assertThat;
@@ -93,7 +94,7 @@ public class AuthMeInitializationTest {
@Test
public void shouldInitializeAllServices() {
// given
Settings settings = new Settings(settingsFile, dataFolder, getAllPropertyFields(), alwaysFulfilled());
Settings settings = new Settings(dataFolder, getAllPropertyFields(), mock(PropertyResource.class), alwaysFulfilled());
Injector injector = new InjectorBuilder().addDefaultHandlers("fr.xephi.authme").create();
injector.provide(DataFolder.class, dataFolder);