-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Improve the test coverage #4272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4272 +/- ##
===========================================
+ Coverage 78.70% 89.43% +10.73%
===========================================
Files 248 251 +3
Lines 9552 9564 +12
Branches 1459 1456 -3
===========================================
+ Hits 7518 8554 +1036
+ Misses 1792 771 -1021
+ Partials 242 239 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Implemented tests for StringToBooleanTypeConverter, StringToDateOnlyTypeConverter, StringToDateTimeOffsetTypeConverter, StringToDateTimeTypeConverter, StringToGuidTypeConverter, StringToNullableBooleanTypeConverter, StringToNullableDateOnlyTypeConverter, StringToNullableDateTimeOffsetTypeConverter, StringToNullableDateTimeTypeConverter, StringToNullableGuidTypeConverter, StringToNullableTimeOnlyTypeConverter, StringToNullableTimeSpanTypeConverter, StringToTimeOnlyTypeConverter, StringToTimeSpanTypeConverter, StringToUriTypeConverter, TimeOnlyToStringTypeConverter, TimeSpanToStringTypeConverter, and UriToStringTypeConverter. - Each test class includes tests for affinity and conversion success for valid inputs, as well as handling of null, empty, and invalid strings. - Ensured compatibility with .NET 6.0 or greater where applicable.
…ents Refactors PropertyBinderImplementation (1,170 lines -> 709 lines, 39% reduction) by extracting three internal service interfaces with implementations and mock support. Changes: - Extract IBindingConverterResolver: Type converter resolution with RxConverters/Splat fallback - Extract IPropertyBindingExpressionCompiler: Expression analysis, compilation, and observable creation - Extract IBindingHookEvaluator: Pre-binding validation via registered hooks - Add internal constructor for dependency injection (enables testing) - Maintain public parameterless constructor for backward compatibility - Create mock implementations (MockBindingConverterResolver, MockPropertyBindingExpressionCompiler, MockBindingHookEvaluator) - Add 17 focused unit tests covering all three services Benefits: - Improved testability: Services can be mocked without global Splat state manipulation - Better separation of concerns: Each service has single responsibility - Maintained backward compatibility: No public API changes - All 4,929 tests pass (51 new unit tests added) - StyleCop compliant: Build succeeds with -warnaserror
…erRegistrar - Introduced BindingTypeConverterTests to validate conversion logic for various types including string to int, nullable handling, and type mismatches. - Enhanced StringToByteTypeConverterTests, StringToDecimalTypeConverterTests, StringToDoubleTypeConverterTests, StringToIntegerTypeConverterTests, StringToLongTypeConverterTests, StringToShortTypeConverterTests, and StringToSingleTypeConverterTests with additional test cases for null inputs, zero values, and negative values. - Created DependencyResolverRegistrarTests to ensure proper registration and resolution of services, including tests for null checks and contract handling. - Implemented a mock dependency resolver for testing purposes to verify interactions with the registrar.
…luator with additional unit tests
… improve test coverage
… caching behavior
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.
This pull request adds comprehensive new unit tests across several test projects to improve coverage and reliability for ReactiveUI's builder mixins, generic host controls, and testing utilities. The new tests ensure correct registration, property behavior, and exception handling for various components, as well as robust test isolation and MessageBus override mechanisms.