Commit Graph

109 Commits

Author SHA1 Message Date
Xephi
8fec53eda3 Remove todo for #368 2015-12-28 14:26:37 +01:00
ljacqu
37604e6a51 Always check for "testable" methods in listener consistency test
- Add check to overlooked test
2015-12-28 14:05:20 +01:00
ljacqu
48dce83892 Exclude all methods containing '$' in ListenerConsistencyTest 2015-12-28 13:56:54 +01:00
ljacqu
103ebb44f0 Merge master into 306-commands-service
Conflicts:
- AuthMe
- CommandInitializer
- ConverterCommand
2015-12-26 21:33:25 +01:00
ljacqu
47e97244a7 #306 Create tests for CommandService and PlayerCommand 2015-12-26 20:58:05 +01:00
ljacqu
27fee3ca64 #306 Create PlayerCommand abstract type
- Create PlayerCommand to handle player-only command checks centrally and consistently
- Adjust tests
2015-12-26 19:47:47 +01:00
ljacqu
5ab3a1f9ef Minor - remove StringUtils#getStackTrace
- Remove StringUtils#getStackTrace in favor of Guava's Throwables#getStackTraceAsString
2015-12-26 18:01:09 +01:00
ljacqu
c73969256c Merge master into '306-command-service'
Conflict:
- HelpCommand.java
2015-12-26 13:01:00 +01:00
ljacqu
71a9f4140b #375 Issue warning instead of failing test for non-ASCII password
- Add javadoc to fields
2015-12-26 12:52:05 +01:00
ljacqu
9e8f51c616 #306 Fully test HelpProvider and CommandSyntaxHelper 2015-12-24 15:26:25 +01:00
ljacqu
050275a0a6 #306 Fully test AccountsCommand 2015-12-24 12:19:14 +01:00
ljacqu
cb2ffca6d3 #306 Change help provider to non-static / add calls to help functionality 2015-12-23 23:51:39 +01:00
ljacqu
a9fc658db0 Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 306-command-service 2015-12-23 18:09:21 +01:00
ljacqu
be942c2b36 #306 Fix tests for command mapper and command handler
- Export initializing and retrieval of test commands to a separate class
2015-12-23 18:04:46 +01:00
Gabriele C
da84efe090 Merge pull request #84 from games647/gamemode
Remove gamemode and flying switching
2015-12-23 15:42:24 +01:00
ljacqu
c50741e1ca #375 Remove Ignore annotation on password hash check test 2015-12-23 15:28:52 +01:00
games647
8c1eef3f59 Remove gamemode and flying switching
Fixes Xephi/AuthMeReloaded#355
Fixes Xephi/AuthMeReloaded#320
Fixes Xephi/AuthMeReloaded#258
Fixes Xephi/AuthMeReloaded#246
2015-12-23 15:00:44 +01:00
ljacqu
14f6ecd716 #306 Adjust ExecutableCommand implementations to interface 2015-12-23 14:55:04 +01:00
ljacqu
8ef1b2ae3e #306 Add command service and set up constructor dependency injection
(work in progress)
- Pass all dependencies via constructor
- Encapsulate command handling more (e.g. split CommandHandler with new CommandMapper)
- Add help command to all base commands at one central point

See AccountsCommand or HelpCommand for an example of the advantages - all necessary functions come from CommandService; objects aren't retrieved through a singleton getInstance() method anymore
2015-12-23 14:54:45 +01:00
ljacqu
f785d9d357 Revert 799ecf8 and apply Ignore annotation to test failing locally
- Revert commit (undo formatting changes, commented out code)
- Add ignore to not run the test due to local problems (probably because of some character encoding issue)
2015-12-23 09:19:59 +01:00
Xephi59
799ecf8f7e Comment these test for this moment 2015-12-23 00:46:08 +01:00
ljacqu
f835a95bac Verify only one listener per event; #367 verify listener not using MONITOR 2015-12-21 23:14:42 +01:00
ljacqu
1f11537b85 #364 Add more tests for encryption algorithms
- Rename getHash() to computeHash(): get.. suggests it's just retrieving some field but it's really doing a computation, which is quite complex depending on the hash algorithm
2015-12-20 23:43:54 +01:00
ljacqu
f809d91c45 Minor refactoring in listeners; create listener consistency test
- Export duplicated code into a service
- Remove canConnect attribute from AuthMe class - was unused and doesn't seem sensible
- Add consistency test for listener classes
2015-12-20 20:26:01 +01:00
ljacqu
51d1705b1f #364 Add tests for more encryption algorithms 2015-12-20 14:08:43 +01:00
ljacqu
bf7a0c5a49 #364 Create first EncryptionMethod tests 2015-12-20 00:51:15 +01:00
ljacqu
a928a4092d #305 Fix label handling, add extensive tests for command handler 2015-12-19 16:27:00 +01:00
ljacqu
01a294a334 #305 Adjust behavior of label handling; cleanup
- Fix bugs in behavior (wrong labels being shown for help)
- Change order of labels and arguments in FoundCommandResult constructors
- Move FoundResultStatus enum to its own class
- Create test class for HelpProvider
2015-12-18 22:19:26 +01:00
ljacqu
d871939793 Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into commands-refactor
Conflicts:
	src/main/java/fr/xephi/authme/command/CommandUtils.java
	src/main/java/fr/xephi/authme/command/executable/captcha/CaptchaCommand.java
2015-12-17 22:32:26 +01:00
ljacqu
cbf0996197 Logic for FoundCommandResult.Status / Add tests for CommandHandler
- Fix other tests
- Add logic for smaller pending FIXME's
2015-12-17 22:23:43 +01:00
ljacqu
dcc365c22f Fix #349 Create method on Messages to pass tag replacements
- Add tests
- Fix placeholder in some files
2015-12-16 20:46:40 +01:00
ljacqu
3de7a7584e Merge prefix tests for AdminPermission and PlayerPermission 2015-12-15 09:00:41 +01:00
ljacqu
bfebf6dc44 Add tests for CommandUtils, move purgeDirectory to its only use 2015-12-14 21:37:20 +01:00
ljacqu
282f777311 #336 Create command list generator in tools
- Add new conditional template tags [...] blabla [/...]
- Create logic for generating a list of commands
2015-12-14 21:07:03 +01:00
ljacqu
0fdc8d2810 Fix #338 Create test to verify consistent argument count 2015-12-14 16:24:09 +01:00
ljacqu
c48c56f08c Change to new HelpProvider, adjust classes to new methods 2015-12-13 10:12:54 +01:00
ljacqu
d5b2058124 Change ExecutableCommand interface (wip – doesn't compile)
- Change interface to use (CommandSender, List<String> arguments)
- Use CommandArgumentDescription#name instead of "label" (to prevent confusion between command labels and arguments)
- Simplify command difference computation in CommandHandler (no longer consider argument difference)
2015-12-12 12:48:39 +01:00
ljacqu
eecad80748 Change ExecutableCommand interface (wip – doesn't compile)
- Change interface to use (CommandSender, List<String> arguments)
- Use CommandArgumentDescription#name instead of "label" (to prevent confusion between command labels and arguments)
- Simplify command difference computation in CommandHandler (no longer consider argument difference)
2015-12-12 11:39:19 +01:00
ljacqu
2f153fb85c #305 Modularize logic / separate from data classes (wip – doesn't compile)
- Remove permission logic on command side; make PermissionsManager handle checks for all CommandSender objects (not only Player), cf. #314
- Remove unnecessary redundancies in passed arguments ("command references" that can be inferred from the FoundResult)
- Extend FoundCommandResult to represent all possible error cases
2015-12-12 00:43:55 +01:00
Gabriele C
6ee07160bb cleanup and update deps 2015-12-08 20:07:10 +01:00
ljacqu
f99bba4b5f #314 Encapsulate permissions package better
- Move permissions responsibilities from command to permissions (remove some logic from CommandPermissions, add DefaultPermission enum to permissions package)

- Start possible interface for the future per-permission system implementations of permissions managers
2015-12-05 23:05:42 +01:00
ljacqu
9d39fc1127 Undo wrong renaming of test class falsely including 'Admin' 2015-12-05 10:55:05 +01:00
ljacqu
b419c72271 Fix #316 Ordinary player can use /authme unregister
- Change wrong player permissions to admin permissions
- Rename command class names that were the same for the ordinary vs. admin task
- Create test to ensure that commands with OP_ONLY default require an admin permission node
2015-12-05 10:48:42 +01:00
ljacqu
2faad44ffa Move most API of CommandParts to util classes
Gradual transition to removing CommandParts altogether.
 - Move logic from CommandParts to utils classes
2015-12-04 23:19:37 +01:00
ljacqu
9140ebe602 Change initialized command descriptions to Set
- Set is more efficient if it's frequently used for `contains()`, which is what we use it for after initialization
2015-12-04 21:58:16 +01:00
ljacqu
c78e12de04 Refactorings - prepare to remove FoundCommandResult
- Reduce tight coupling by passing list of available commands as param to CommandHandler
- Split command processing method into several smaller ones
- Remove unfinished logic for unlimited command arguments (reason: was not implemented and not used, probably needs another way to handle it once the need for it arises)
- Create test for CommandHandler
2015-12-04 21:33:50 +01:00
ljacqu
152a0cabb5 Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into command-perms-refactor
Conflicts:
	src/main/java/fr/xephi/authme/command/CommandInitializer.java
2015-12-03 22:16:52 +01:00
ljacqu
1fbe4e0c3b #298 Change password shows wrong 'pw cant be username' error
- Change MessageKey to the proper message
- Change permissions for admin changepassword to admin
- Rename player changepassword command arguments to reflect their actual meaning
2015-12-03 22:07:18 +01:00
ljacqu
1ca6bcffe1 Make AuthMe.management private; create test for CaptchaCommand 2015-12-02 22:13:43 +01:00
ljacqu
f698c9241b Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into command-perms-refactor
Conflicts:
	src/main/java/fr/xephi/authme/output/Log4JFilter.java
2015-12-02 21:56:53 +01:00