#830 Write tests for registration process
This commit is contained in:
+3
-1
@@ -20,7 +20,9 @@ import javax.inject.Inject;
|
||||
|
||||
import static fr.xephi.authme.process.register.executors.PlayerAuthBuilderHelper.createPlayerAuth;
|
||||
|
||||
|
||||
/**
|
||||
* Provides registration executors for password-based registration variants.
|
||||
*/
|
||||
class PasswordRegisterExecutorProvider {
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -10,6 +10,9 @@ import org.bukkit.entity.Player;
|
||||
*/
|
||||
final class PlayerAuthBuilderHelper {
|
||||
|
||||
private PlayerAuthBuilderHelper() {
|
||||
}
|
||||
|
||||
static PlayerAuth createPlayerAuth(Player player, HashedPassword hashedPassword, String email) {
|
||||
return PlayerAuth.builder()
|
||||
.name(player.getName().toLowerCase())
|
||||
@@ -20,7 +23,4 @@ final class PlayerAuthBuilderHelper {
|
||||
.location(player.getLocation())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@ public interface RegistrationExecutor {
|
||||
/**
|
||||
* Returns whether the registration may take place. Use this method to execute
|
||||
* checks specific to the registration method.
|
||||
* <p>
|
||||
* If this method returns {@code false}, it is expected that the executor inform
|
||||
* the player about the error within this method call.
|
||||
*
|
||||
* @return true if registration may be performed, false otherwise
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user