#1037 Improve architecture of registration methods (#236)

* #1037 Improve architecture of registration methods
- Introduce parameters classes for each registration method
- RegistrationMethod has constants with the required parameters class -> no longer need to have a RegistrationExecutorProvider class that needs to be injected everywhere, let AsyncRegister be the only one to worry about which class will perform the registration
- Fix inheritance of password registration types - previously two-factor auth registration inherited from password registration directly

* Create matcher which checks for equality via reflections
- Allow to perform equality check on objects with default equals() method
This commit is contained in:
ljacqu
2017-03-20 08:19:52 +01:00
committed by GitHub
parent 7f16e80442
commit 9a9d0974f8
31 changed files with 820 additions and 393 deletions
@@ -9,6 +9,7 @@ import fr.xephi.authme.command.CommandHandler;
import fr.xephi.authme.datasource.DataSource;
import fr.xephi.authme.initialization.DataFolder;
import fr.xephi.authme.initialization.factory.FactoryDependencyHandler;
import fr.xephi.authme.initialization.factory.SingletonStoreDependencyHandler;
import fr.xephi.authme.listener.BlockListener;
import fr.xephi.authme.permission.PermissionsManager;
import fr.xephi.authme.process.Management;
@@ -93,7 +94,7 @@ public class AuthMeInitializationTest {
new Settings(dataFolder, mock(PropertyResource.class), null, buildConfigurationData());
Injector injector = new InjectorBuilder()
.addHandlers(new FactoryDependencyHandler())
.addHandlers(new FactoryDependencyHandler(), new SingletonStoreDependencyHandler())
.addDefaultHandlers("fr.xephi.authme")
.create();
injector.provide(DataFolder.class, dataFolder);