Skip to content

Conversation

@thomhurst
Copy link
Owner

No description provided.

- Implemented MethodAssertionGenerator to create assertion classes and extension methods from methods decorated with [GenerateAssertion].
- Added support for various return types: bool, AssertionResult, Task<bool>, and Task<AssertionResult>.
- Created tests for boolean methods, assertion result methods, and async methods to validate generated assertions.
- Introduced [AssertionFrom] attribute to generate assertions from existing methods in libraries or user code.
- Updated documentation to include usage examples and best practices for using source generator assertions.
… update generated assertions for async methods
- Updated `AssertionMethodGenerator` to conditionally add async support based on return type.
- Removed deprecated assertions for `Assembly`, `CancellationToken`, `Char`, and `DateTime` in favor of source-generated assertions.
- Migrated assertions like `IsCollectible`, `IsDynamic`, `IsFullyTrusted`, and others to `AssemblyAssertionExtensions.cs`.
- Consolidated `CancellationToken` assertions into `CancellationTokenAssertionExtensions.cs`.
- Removed `CharSpecializedAssertions.cs` and replaced with `CharAssertionExtensions.cs` for static method assertions.
- Moved `DateTime` assertions to `DateTimeMethodAssertions.cs` with source-generated attributes.
- Refactored `Encoding` assertions into `EncodingPropertyAssertions.cs` for property-based checks.
- Consolidated string assertions into `StringStaticMethodAssertions.cs` for static method checks.
- Updated `AssertionExtensions.cs` to reflect the removal of old assertion methods and added notes for migrated assertions.
…c handling, remove legacy boolean assertions, and add source-generated extensions for boolean and DayOfWeek assertions.
…, Exception, and StringBuilder types; remove legacy assertion classes.
…ellationToken types; consolidate and remove legacy assertion classes.
…ead, TimeSpan, Type, and Uri types; implement various assertions for each type.
…Time, and Encoding types; consolidate and remove legacy assertion classes.
…ss, Lazy<T>, Process, and Version types; implement various assertions for each type.
…d TimeZoneInfo types; implement various assertions for each type.
…, FileInfo, TimeOnly, and WeakReference types; implement various assertions for each type.
…, Array, DateOnly, TimeOnly, Index, Range, TimeZoneInfo, and WeakReference types; implement various assertions for each type.
- Implemented GuidAssertionTests to verify empty and non-empty GUIDs.
- Created LazyAssertionTests to check if Lazy<T> values are created or not.
- Added StringBuilderAssertionTests to assert on empty and non-empty StringBuilder instances and their capacity.
- Developed TaskAssertionTests to validate task states including completion, cancellation, and faulting.
- Introduced TimeSpanAssertionTests to assert on TimeSpan values for zero, positive, negative, and non-negative checks.
…er IntelliSense support

- Added [EditorBrowsable(EditorBrowsableState.Never)] attribute to various assertion methods across multiple extension classes including Array, Assembly, Boolean, CancellationToken, CultureInfo, DateOnly, DateTime, DateTimeOffset, DayOfWeek, DirectoryInfo, Encoding, Exception, FileInfo, Guid, HttpStatusCode, Lazy, Range, Stream, StringBuilder, TimeOnly, TimeSpan, and Version.
- This change helps to hide these methods from IntelliSense, making the public API cleaner and focusing on the most relevant methods for users.
…nd update documentation for IntelliSense clarity
…P address, process, thread, and type scenarios
- Implemented RangeAssertionTests to validate range indices and boundaries.
- Added StreamAssertionTests to check stream capabilities like reading, writing, and seeking.
- Created StringBuilderAssertionTests to assert on StringBuilder properties such as emptiness and capacity.
- Developed TaskAssertionTests to verify task states including completion, cancellation, and faulting.
- Introduced ThreadAssertionTests to check thread properties like alive status and background state.
- Added TimeOnlyAssertionTests to validate TimeOnly properties such as midnight and noon.
- Implemented TimeSpanAssertionTests to assert on TimeSpan characteristics like zero, positive, and negative values.
- Created TimeZoneInfoAssertionTests to check daylight saving time support and IANA ID presence.
- Developed TypeAssertionTests to validate various type characteristics including class, interface, and generics.
- Added UriAssertionTests to assert on URI properties such as absolute, file, and loopback.
- Implemented VersionAssertionTests to check version properties like major version and build number.
- Created WeakReferenceAssertionTests to validate weak reference behavior and resurrection tracking.
- Implement tests for Thread, TimeOnly, TimeSpan, and TimeZoneInfo assertion generators.
- Add comprehensive tests for Type assertion generators, covering various type checks.
- Introduce tests for Uri, Version, and WeakReference assertion generators.
- Ensure each test verifies the generation of corresponding assertion extension methods.
This was referenced Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants