Commit Graph

15 Commits

Author SHA1 Message Date
ljacqu 72fe710b8c Fix UtilsTest, create MessageKeyTest 2015-11-24 22:21:36 +01:00
ljacqu 16a69d4126 Merge upstream/master into ljacqu/enums 2015-11-23 23:31:26 +01:00
ljacqu 6422f90114 Create Wrapper for instances / revise MockUtils
- Add test resources folder
- Create basic test for Messages (todo: add concrete tests)
- Create WrapperMock
- Change UtilsTest (todo: make it work)
2015-11-23 23:25:03 +01:00
Tim Visée 09067ddbd1 Removed redundant code, fixed some warnings, other minor fixes 2015-11-23 22:18:04 +01:00
Tim Visée 1dd540b9c0 Fixed some redundant casts and definitions 2015-11-23 22:09:15 +01:00
Tim Visée 47b1d00ccf Fixed various spelling and grammar issues 2015-11-23 22:07:32 +01:00
ljacqu e456203fc6 Refactor Utils#getOnlinePlayers and add background info 2015-11-22 01:30:07 +01:00
ljacqu fc3f685de0 Create UtilsTest
Had to create a getGameServer() method in AuthMe in order to be able to catch this call in tests and replace it with a mock implementation of the actual server. The supertype method getServer() is declared as final, which makes it impossible to mock with Mockito.

While there are frameworks that manipulate the bytecode to mock final calls, it is much easier and less risky to simply delegate the server retrieval through another method.
2015-11-21 23:09:04 +01:00
ljacqu b3d0a71dec Merge ListUtil into StringUtil; refactor HelpSyntaxHelper + create test
The HelpSyntaxHelper had suppressed warnings for string concatenation within StringBuilder - the point of the StringBuilder is that it is faster when you use it to concatenate many elements. If you still use string concatenation with + within these calls it beats the purpose.
2015-11-21 17:19:11 +01:00
ljacqu a3f24bcb9a Create test for HelpSyntaxHelperTest 2015-11-21 17:18:58 +01:00
ljacqu 58dc15123c Add tests for LogoutCommand and RegisterCommand. Add more generic mockUtil 2015-11-21 17:18:45 +01:00
ljacqu 4e8614fdf7 Add test for LoginCommand; create AuthMe mock test util
Had to create a getter for the Management instance in the AuthMe class for mocking, but fields should generally not be accessed globally. Hopefully soon we will be able to make the field private.
2015-11-21 17:18:28 +01:00
ljacqu 9a68aa5517 Proper Javadoc example / add test for StringUtils
- Proper example for the purpose of javadoc and how it could look like
- Fix containsAny to be null safe
- Add tests
2015-11-21 08:28:53 +01:00
Gabriele C 118c79401a Prepare the project for javadocs 2015-11-21 01:27:06 +01:00
Gabriele C ba483af807 fix project layout 2015-11-20 23:43:26 +01:00