Refactor test organization with @Nested classes and @DisplayName annotations#31
Merged
bernardladenthin merged 1 commit intomasterfrom Apr 19, 2026
Merged
Conversation
Convert 57 editor-fold groups to JUnit 5 @nested inner classes so the IDE test tree and Surefire report show a readable two-level hierarchy instead of a flat list of 229 methods. Each nested class gets a @DisplayName matching its former fold description; each @test and @ParameterizedTest gets a @DisplayName derived from its method name for living-specification output. Supporting changes: - Add imports for @nested and @DisplayName - Relax anyValue to package-private for inner-class access - Move writeAnyValue() helper to outer-class scope - Fix @MethodSource refs for writeMethods (fully-qualified) and capMissingBytesInputs / trimDecisionTestCases (same-class refs) All 267 tests pass. https://claude.ai/code/session_01T1tckwxXUVgz74QEVtFjr7
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
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.
Summary
Refactored the StreamBufferTest class to improve test organization and readability by replacing editor-fold comments with JUnit 5's
@Nestedinner classes and adding@DisplayNameannotations to all test methods.Key Changes
// <editor-fold>comments) into proper@Nestedinner test classes with descriptive namesRoundtripTests,ConstructorTests,ReadTests,WriteTests, etc.)org.junit.jupiter.api.DisplayNameandorg.junit.jupiter.api.NestedimportsanyValuefield modifier fromprivate final statictostatic finalfor consistency@MethodSourceannotations to use fully qualified class names where neededBenefits
https://claude.ai/code/session_01T1tckwxXUVgz74QEVtFjr7