Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions TUnit.Assertions/Extensions/AssertionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public static MemberAssertionResult<TObject> Member<TObject, TKey, TValue>(
/// Example: await Assert.That(myObject).Member(x => x.Attributes, attrs => attrs.ContainsKey("status").And.IsNotEmpty());
/// Note: This overload exists for backward compatibility. For AOT compatibility, use the TTransformed overload instead.
/// </summary>
[OverloadResolutionPriority(2)]
[OverloadResolutionPriority(1)]
[RequiresDynamicCode("Uses reflection for legacy compatibility. For AOT compatibility, use the Member<TObject, TKey, TValue, TTransformed> overload with strongly-typed assertions.")]
public static MemberAssertionResult<TObject> Member<TObject, TKey, TValue>(
this IAssertionSource<TObject> source,
Expand Down Expand Up @@ -421,7 +421,7 @@ public static MemberAssertionResult<TObject> Member<TObject, TItem>(
/// Example: await Assert.That(myObject).Member(x => x.Tags, tags => tags.HasCount(1).And.Contains("value"));
/// Note: This overload exists for backward compatibility. For AOT compatibility, use the TTransformed overload instead.
/// </summary>
[OverloadResolutionPriority(1)]
[OverloadResolutionPriority(0)]
[RequiresDynamicCode("Uses reflection for legacy compatibility. For AOT compatibility, use the Member<TObject, TItem, TTransformed> overload with strongly-typed assertions.")]
public static MemberAssertionResult<TObject> Member<TObject, TItem>(
this IAssertionSource<TObject> source,
Expand Down Expand Up @@ -527,6 +527,7 @@ public static MemberAssertionResult<TObject> Member<TObject, TMember, TTransform
/// After the member assertion completes, returns to the parent object context for further chaining.
/// Example: await Assert.That(myObject).Member(x => x.PropertyName, value => value.IsEqualTo(expectedValue));
/// </summary>
[OverloadResolutionPriority(0)]
public static MemberAssertionResult<TObject> Member<TObject, TMember>(
this IAssertionSource<TObject> source,
Expression<Func<TObject, TMember>> memberSelector,
Expand Down Expand Up @@ -579,6 +580,7 @@ public static MemberAssertionResult<TObject> Member<TObject, TMember>(
/// Example: await Assert.That(myObject).Member(x => x.PropertyName, value => value.IsEqualTo(expectedValue));
/// Note: This overload exists for backward compatibility. For AOT compatibility, use the TTransformed overload instead.
/// </summary>
[OverloadResolutionPriority(-1)]
[RequiresDynamicCode("Uses reflection for legacy compatibility. For AOT compatibility, use the Member<TObject, TMember, TTransformed> overload with strongly-typed assertions.")]
public static MemberAssertionResult<TObject> Member<TObject, TMember>(
this IAssertionSource<TObject> source,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1649,19 +1649,21 @@ namespace .Extensions
public static .<TObject> Member<TObject, TItem>(this .<TObject> source, .<<TObject, .<TItem>>> memberSelector, <.<.<TItem>, TItem>, .<.<TItem>>> assertions) { }
[.("Uses reflection for legacy compatibility. For AOT compatibility, use the Member<T" +
"Object, TItem, TTransformed> overload with strongly-typed assertions.")]
[.(1)]
[.(0)]
public static .<TObject> Member<TObject, TItem>(this .<TObject> source, .<<TObject, .<TItem>>> memberSelector, <.<.<TItem>, TItem>, object> assertions) { }
[.(0)]
public static .<TObject> Member<TObject, TMember>(this .<TObject> source, .<<TObject, TMember>> memberSelector, <.<TMember>, .<TMember>> assertions) { }
[.("Uses reflection for legacy compatibility. For AOT compatibility, use the Member<T" +
"Object, TMember, TTransformed> overload with strongly-typed assertions.")]
[.(-1)]
public static .<TObject> Member<TObject, TMember>(this .<TObject> source, .<<TObject, TMember>> memberSelector, <.<TMember>, object> assertions) { }
[.(2)]
public static .<TObject> Member<TObject, TItem, TTransformed>(this .<TObject> source, .<<TObject, .<TItem>>> memberSelector, <.<.<TItem>, TItem>, .<TTransformed>> assertions) { }
[.(2)]
public static .<TObject> Member<TObject, TKey, TValue>(this .<TObject> source, .<<TObject, .<TKey, TValue>>> memberSelector, <.<.<TKey, TValue>, TKey, TValue>, .<.<TKey, TValue>>> assertions) { }
[.("Uses reflection for legacy compatibility. For AOT compatibility, use the Member<T" +
"Object, TKey, TValue, TTransformed> overload with strongly-typed assertions.")]
[.(2)]
[.(1)]
public static .<TObject> Member<TObject, TKey, TValue>(this .<TObject> source, .<<TObject, .<TKey, TValue>>> memberSelector, <.<.<TKey, TValue>, TKey, TValue>, object> assertions) { }
[.(1)]
public static .<TObject> Member<TObject, TMember, TTransformed>(this .<TObject> source, .<<TObject, TMember>> memberSelector, <.<TMember>, .<TTransformed>> assertions) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1649,19 +1649,21 @@ namespace .Extensions
public static .<TObject> Member<TObject, TItem>(this .<TObject> source, .<<TObject, .<TItem>>> memberSelector, <.<.<TItem>, TItem>, .<.<TItem>>> assertions) { }
[.("Uses reflection for legacy compatibility. For AOT compatibility, use the Member<T" +
"Object, TItem, TTransformed> overload with strongly-typed assertions.")]
[.(1)]
[.(0)]
public static .<TObject> Member<TObject, TItem>(this .<TObject> source, .<<TObject, .<TItem>>> memberSelector, <.<.<TItem>, TItem>, object> assertions) { }
[.(0)]
public static .<TObject> Member<TObject, TMember>(this .<TObject> source, .<<TObject, TMember>> memberSelector, <.<TMember>, .<TMember>> assertions) { }
[.("Uses reflection for legacy compatibility. For AOT compatibility, use the Member<T" +
"Object, TMember, TTransformed> overload with strongly-typed assertions.")]
[.(-1)]
public static .<TObject> Member<TObject, TMember>(this .<TObject> source, .<<TObject, TMember>> memberSelector, <.<TMember>, object> assertions) { }
[.(2)]
public static .<TObject> Member<TObject, TItem, TTransformed>(this .<TObject> source, .<<TObject, .<TItem>>> memberSelector, <.<.<TItem>, TItem>, .<TTransformed>> assertions) { }
[.(2)]
public static .<TObject> Member<TObject, TKey, TValue>(this .<TObject> source, .<<TObject, .<TKey, TValue>>> memberSelector, <.<.<TKey, TValue>, TKey, TValue>, .<.<TKey, TValue>>> assertions) { }
[.("Uses reflection for legacy compatibility. For AOT compatibility, use the Member<T" +
"Object, TKey, TValue, TTransformed> overload with strongly-typed assertions.")]
[.(2)]
[.(1)]
public static .<TObject> Member<TObject, TKey, TValue>(this .<TObject> source, .<<TObject, .<TKey, TValue>>> memberSelector, <.<.<TKey, TValue>, TKey, TValue>, object> assertions) { }
[.(1)]
public static .<TObject> Member<TObject, TMember, TTransformed>(this .<TObject> source, .<<TObject, TMember>> memberSelector, <.<TMember>, .<TTransformed>> assertions) { }
Expand Down
Loading