Our great sponsors
-
FizzBuzz Enterprise Edition
FizzBuzz Enterprise Edition is a no-nonsense implementation of FizzBuzz made by serious businessmen for serious business purposes.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Sometimes I really want to meet a guy who GoFing code he supports, because of: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
But ok, lets try with this example, line 40 : https://github.com/eugenp/tutorials/blob/master/testing-modules/junit5-annotations/src/test/java/com/baeldung/junit5/nested/OnlinePublicationUnitTest.java This code tests a function which is 5 lines long, called only once. It doesn't even deserve a method declaration, this is complexity for the sake of testability. 6 months from now, when you look for articles filtered by user membership, you are not going to find this function. You will be lost in a maze of method declarations. Fragmenting your execution flow is a bad idea, especially for testability purposes. The test code is even more complex than the code being tested.