refactor: Consolidate encoding/hashing tests to eliminate DRY violations#1467
Conversation
SummaryConsolidates 7 separate encoding/hashing test files into a single EncodingTests.cs file, reducing ~290 lines of duplicated code while preserving all 18 test cases. Critical IssuesNone found ✅ SuggestionsRemove Unused Test Data MethodsThe methods Location: test/ModularPipelines.UnitTests/Helpers/EncodingTests.cs:22-60 Similarly, the Rationale: The current approach uses concrete module classes (ToBase64Module, FromBase64Module, etc.) which works fine for this test suite. The data-driven infrastructure adds unnecessary complexity without providing value. Verdict✅ APPROVE - No critical issues The consolidation successfully eliminates DRY violations while maintaining full test coverage. The unused code is minor cleanup that doesn't block the PR. |
Replace 7 separate test files (Base64Tests, HexTests, Md5Tests, Sha1Tests, Sha256Tests, Sha384Tests, Sha512Tests) with a single EncodingTests.cs file that uses shared module definitions and organized test regions. This reduces ~290 lines of duplicated test code while maintaining all 18 original test cases with identical functionality. Closes #1455 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
aa60431 to
7dfe9a7
Compare
SummaryConsolidates 7 separate encoding/hashing test files into a single Critical IssuesNone found ✅ SuggestionsRemove Unused Test Data MethodsThe methods Similarly, the Rationale: The current approach uses concrete module classes ( Previous Review StatusOne previous comment from github-actions bot approves the PR with the same suggestion to remove unused code. Verdict✅ APPROVE - No critical issues The consolidation successfully eliminates DRY violations while maintaining full test coverage. The unused code is minor cleanup that doesn't block the PR. |
Summary
EncodingTests.csfileChanges
Files Removed
Base64Tests.cs(67 lines)HexTests.cs(67 lines)Md5Tests.cs(38 lines)Sha1Tests.cs(38 lines)Sha256Tests.cs(38 lines)Sha384Tests.cs(38 lines)Sha512Tests.cs(38 lines)Files Added
EncodingTests.cs- consolidated test class with all functionality preservedTest Plan
Closes #1455
🤖 Generated with Claude Code