-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor tests to use JUnit 5 Migrated test annotations from JUnit 4 to JUnit 5 for better compatibility and future-proofing. Replaced JUnit 4 import statements, annotations, and assertion methods with their JUnit 5 equivalents. * Switch to AssertJ for assertions in tests Refactored the test classes to use AssertJ for assertions instead of JUnit's Assertions. This enhances the readability of the tests and provides more expressive error messages. All relevant assertion statements have been updated accordingly. * Update tests to use correct offset for float assertions Refactor test assertions in FieldFactoryTest to use Offset.offset for float values. This ensures accurate float comparison by specifying a float-specific offset, improving test reliability. * tests * Update FloatFieldTest to use Percentage for comparisons Replaced 'within' with 'Percentage.withPercentage' for better accuracy in float comparisons. Also streamlined string assertions using 'hasToString' for improved readability. * Rename test method and enhance decoder error handling Renamed the test method from `decode` to `shouldDecode` to follow naming conventions. Added a new private `decode` method to improve error handling, ensuring the test correctly captures `DecoderException` when unexpected tags are encountered. * Refactor test case setup in FixedPointNumberFromStringTest Simplify the initialization of FixedPointNumber instances in test methods by removing the initFixedPointNumberFromStringTest method. This reduces redundant code and ensures each test directly initializes FixedPointNumber, enhancing readability and maintainability. * Refactor BooleanFieldTest assertions for clarity Update assertions in BooleanFieldTest to use `hasSize` for byte array length checks and explicitly cast characters to byte type for better readability and consistency. This refactoring improves code clarity and maintainability. * Refactor ClientSessionHandlerTest for improved assertions Updated ClientSessionHandlerTest to use AssertJ assertions to enhance readability and consistency. Introduced lenient mocking for the sequenceProvider and improved method naming for clarity. Additionally, restored password authentication for channelActive tests and fixed mock setups to align with the updated assertions. * Refactor test class to remove redundant initialization. Removed unused fields and methods in `FixedPointNumberFromDoubleTest` to streamline the test setup. Parameterized tests now directly initialize `FixedPointNumber` instances, resulting in cleaner and more efficient code. * Refactor FixedPointNumberFromLongTest setup logic Removed the initialization method and the setup method in FixedPointNumberFromLongTest, consolidating the setup logic directly within the test methods. This simplification reduces redundancy and improves readability. All test methods now instantiate FixedPointNumber directly. * Refactor tests and update mock strictness in FixMessageEncoderTest Update test names for clarity and remove redundant exceptions in encode tests. Also, change mock strictness to LENIENT to avoid unnecessary strict mock errors during testing. * Refactor IntFieldFromBytesTest initialization Removed unnecessary initialization method and directly set up IntField in tests. Also handled ParseException where required. These changes help streamline test code and improve readability. * Relax Mock strictness to LENIENT for unit tests Updated the strictness of @mock annotations to LENIENT in ServerChannelPipelineIntegrationTest and AbstractSessionHandlerTest classes. This change enhances test flexibility by allowing certain interactions without strict verification, ensuring smoother test execution. * Update dependencies and add maven-dependency-plugin Replaced netty-all with netty-handler and adjusted JUnit dependencies. Removed unnecessary JUnitParams and shifted slf4j-simple to test scope. Added maven-dependency-plugin for better dependency analysis and management. * Refactor imports for multiple classes Organized and expanded static imports for `UTCTimeOnlyField` and `UTCTimestampField` classes for improved readability. Aligned indentation in `FieldType.xsl` and removed unnecessary whitespace in other modified files. --------- Co-authored-by: kpavlov <[email protected]>
- Loading branch information
Showing
52 changed files
with
943 additions
and
872 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.