- 
                Notifications
    You must be signed in to change notification settings 
- Fork 536
Migrate to JUnit 5 #2771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            ljacqu
  wants to merge
  25
  commits into
  master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
junit5-migration
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
                
     Open
            
            Migrate to JUnit 5 #2771
Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    - Global issue with the ConsoleLogger remains - Migration of parameterized tests still open
- TempDir annotation does nothing but the test silently worked and created test files into the project root... Ouch :)
- TempDir is initialized too late :(
# Conflicts: # src/test/java/fr/xephi/authme/AuthMeInitializationTest.java # src/test/java/fr/xephi/authme/ConsoleLoggerTest.java # src/test/java/fr/xephi/authme/command/help/HelpMessagesServiceTest.java # src/test/java/fr/xephi/authme/data/limbo/LimboServiceHelperTest.java # src/test/java/fr/xephi/authme/listener/ListenerConsistencyTest.java # src/test/java/fr/xephi/authme/listener/OnJoinVerifierTest.java # src/test/java/fr/xephi/authme/message/MessageFilePlaceholderTest.java # src/test/java/fr/xephi/authme/message/MessagesIntegrationTest.java # src/test/java/fr/xephi/authme/message/updater/MessageUpdaterTest.java # src/test/java/fr/xephi/authme/security/totp/GenerateTotpServiceTest.java
# Conflicts: # src/test/java/fr/xephi/authme/TestHelper.java # src/test/java/fr/xephi/authme/listener/OnJoinVerifierTest.java # src/test/java/fr/xephi/authme/listener/PlayerListenerTest.java # src/test/java/fr/xephi/authme/permission/PermissionsManagerInitializationTest.java # src/test/java/fr/xephi/authme/process/register/AsyncRegisterTest.java # src/test/java/fr/xephi/authme/service/MigrationServiceTest.java # src/test/java/fr/xephi/authme/settings/properties/AuthMeSettingsRetrieverTest.java # src/test/java/fr/xephi/authme/util/ExceptionUtilsTest.java # src/test/java/fr/xephi/authme/util/InternetProtocolUtilsTest.java # src/test/java/fr/xephi/authme/util/RandomStringUtilsTest.java # src/test/java/fr/xephi/authme/util/StringUtilsTest.java # src/test/java/fr/xephi/authme/util/lazytags/TagBuilderTest.java
…o junit5-migration � Conflicts: � pom.xml � src/test/java/fr/xephi/authme/TestHelper.java � src/test/java/fr/xephi/authme/listener/OnJoinVerifierTest.java � src/test/java/fr/xephi/authme/listener/PlayerListenerTest.java � src/test/java/fr/xephi/authme/permission/PermissionsManagerInitializationTest.java � src/test/java/fr/xephi/authme/process/register/AsyncRegisterTest.java � src/test/java/fr/xephi/authme/service/GeoIpServiceTest.java � src/test/java/fr/xephi/authme/service/MigrationServiceTest.java � src/test/java/fr/xephi/authme/settings/properties/AuthMeSettingsRetrieverTest.java � src/test/java/fr/xephi/authme/util/ExceptionUtilsTest.java � src/test/java/fr/xephi/authme/util/InternetProtocolUtilsTest.java � src/test/java/fr/xephi/authme/util/RandomStringUtilsTest.java � src/test/java/fr/xephi/authme/util/StringUtilsTest.java � src/test/java/fr/xephi/authme/util/lazytags/TagBuilderTest.java
…gration # Conflicts: # src/test/java/fr/xephi/authme/listener/OnJoinVerifierTest.java # src/test/java/fr/xephi/authme/process/register/AsyncRegisterTest.java # src/test/java/fr/xephi/authme/service/GeoIpServiceTest.java # src/test/java/fr/xephi/authme/service/MigrationServiceTest.java
# Conflicts: # pom.xml # src/test/java/fr/xephi/authme/listener/PlayerListenerTest.java # src/test/java/fr/xephi/authme/service/AntiBotServiceTest.java
…ntage! - This commit ends the migration to JUnit 5 and removes the junit-vintage dependency - Make some remaining tests & classes package-private
# Conflicts: # src/test/java/fr/xephi/authme/command/executable/authme/debug/MySqlDefaultChangerTest.java # src/test/java/fr/xephi/authme/listener/PlayerListenerTest.java # src/test/java/fr/xephi/authme/permission/handlers/VaultHandlerTest.java # src/test/java/fr/xephi/authme/process/email/AsyncChangeEmailTest.java
# Conflicts: # src/test/java/fr/xephi/authme/api/v3/AuthMeApiTest.java # src/test/java/fr/xephi/authme/output/Log4JFilterTest.java # src/test/java/fr/xephi/authme/process/register/AsyncRegisterTest.java # src/test/java/fr/xephi/authme/security/crypts/AbstractEncryptionMethodTest.java # src/test/java/fr/xephi/authme/service/ValidationServiceTest.java # src/test/java/fr/xephi/authme/settings/SettingsWarnerTest.java # src/test/java/fr/xephi/authme/settings/commandconfig/CommandManagerTest.java # src/test/java/fr/xephi/authme/util/StringUtilsTest.java
# Conflicts: # src/test/java/fr/xephi/authme/service/GeoIpServiceTest.java
- Update JUnit, Hamcrest, Mockito versions - Remove Hamcrest exclusion from Mockito (they've removed Hamcrest as dependency a long time ago) - Remove public modifiers from test methods and refactor them to be in line with our usual pattern
- Remove custom extension and InjectDelayed/BeforeInjecting annotations - Revert injector version to same stable version as on master
      
     Merged
  
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Started in 2019—this migrates all tests to JUnit 5. Unfortunately, this required a few changes in some non-test classes, which is why I'll test the plugin before merging it to master. This PR is useful to see the full diff.
Open points: