discord-jda / JDA

Java wrapper for the popular chat & VOIP service: Discord https://discord.com
Apache License 2.0
4.28k stars 737 forks source link

Unit Test Cases: cleanup, static imports for Assertions #2619

Closed LaFriska closed 5 months ago

LaFriska commented 6 months ago

Pull Request Etiquette

Changes

Closes Issue: NaN

Description

I have noticed an overwhelming amount of Assertions.assertEquals(), Assertions.assertTrue() or other similar static method calls from the Assertions class. I also noticed that some test classes have static imports for Assertions, and some don't. I decided to clean up the code by adding static imports for Assertions for the classes that did not import them already.

Another minor change I made within the code cleanup was that I extracted out a huge builder chain into a separate private method in MessageSerializationTest, to ensure code tidiness.

MinnDevelopment commented 5 months ago

Thanks, but I've decided to move to AssertJ instead. See #2638. Feel free to leave a review there!