test: Improve test module return types and document external URL dependency#1673
Conversation
…ndency - Change test modules from IDictionary<string, object>? to bool when no meaningful return value is needed (Issue #1597). Using bool return type is cleaner and more explicit than returning null for nullable dictionaries. - Add documentation comment to DownloaderTests explaining the external URL dependency and why this approach is reasonable for testing real download functionality (Issue #1619). - Keep IDictionary<string, object> (non-nullable) for JsonSerializationTests where actual dictionary values are needed for testing serialization. - Use string return type for FailedModuleWithCustomRetryPolicy to work with the IRetryable<T> interface (value types have issues with T? generics). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
SummaryRefactors test modules to use more appropriate return types: Critical IssuesNone found ✅ SuggestionsNone - the changes are clean and improve code clarity. The non-nullable dictionary type in JsonSerializationTests correctly reflects that those modules always return actual dictionary instances, while the bool type for other test modules is more explicit than returning null from a nullable dictionary type. Previous Review StatusNo previous comments. Verdict✅ APPROVE - No critical issues The changes improve test code readability and type safety without affecting functionality. All modified return types correctly reflect the actual behavior of the test modules. |
Summary
Module<IDictionary<string, object>?>toModule<bool>where return value was always null (cleaner and more explicit)26 test files modified including:
AfterPipelineLoggerTests, AlwaysRunTests, AsyncDisposableModuleTests, DependsOnTests, DirectCollisionTests, DisposableModuleTests, EngineCancellationTokenTests, FailedPipelineTests, LoggingSecretTests, ModuleHistoryTests, ModuleLoggerTests, ModuleNotRegisteredExceptionTests, NestedCollisionTests, OneWayDependenciesNonCollisionTests, PipelineProgressTests, PipelineRequirementTests, ResultsRepositoryTests, RetryTests, RunnableCategoryTests, SafeEstimatedTimeProviderTests, SkipDependabotAttributeTests, TimedDependencyTests, UnusedModuleDetectorTests
Special cases:
JsonSerializationTests: Uses non-nullableIDictionary<string, object>where actual dictionary values are neededFailedModuleWithCustomRetryPolicy: Usesstringreturn type to work withIRetryable<T>interfaceFixes #1597, Fixes #1619
Test plan
🤖 Generated with Claude Code