Conversation
… and improve IsIn syntax
# Conflicts: # TUnit.Assertions/Extensions/AssertionExtensions.cs
|
Claude finished @thomhurst's task —— View job Pull Request Review: Simplify IsIn / IsNotIn assertionsTodo List:
Review SummaryThis PR successfully simplifies the IsIn/IsNotIn assertions by replacing the complex manual assertion classes with a cleaner source-generated approach. The changes are well-executed and follow TUnit's architectural principles. ✅ Strengths
🔍 Technical AnalysisPerformance Improvements ⭐
API Consistency ⭐// Before: Verbose construction
new IsInAssertion<T>(context, collection)
// After: Clean extension methods
value.IsIn(collection)
value.IsIn(collection, comparer)
value.IsIn(1, 2, 3) // params overloadSource Generator Quality ⭐The generator properly handles:
🎯 API Changes AssessmentThe snapshot files show the new generated methods: public static T_IsIn_IEnumerableT_Assertion<T> IsIn<T>(this IAssertionSource<T> source, IEnumerable<T> collection)
public static T_IsIn__Assertion<T> IsIn<T>(this IAssertionSource<T> source, params T[] collection)
// + equality comparer overloads and IsNotIn variantsThis is a non-breaking change since:
|
Fixes #3575