diff --git a/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet10_0.verified.txt b/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet10_0.verified.txt
new file mode 100644
index 0000000000..2eaba629d7
--- /dev/null
+++ b/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet10_0.verified.txt
@@ -0,0 +1,69 @@
+[
+#nullable enable
+
+using System;
+using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
+using TUnit.Assertions.Core;
+using TUnit.Assertions.Tests.TestData;
+
+namespace TUnit.Assertions.Extensions;
+
+///
+/// Generated assertion for ContainsMessage
+///
+public sealed class StringArray_ContainsMessage_String_Bool_Assertion : Assertion
+{
+ private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed);
+
+ private readonly string _needle;
+ private readonly bool _exact;
+
+ public StringArray_ContainsMessage_String_Bool_Assertion(AssertionContext context, string needle, bool exact)
+ : base(context)
+ {
+ _needle = needle;
+ _exact = exact;
+ }
+
+ protected override Task CheckAsync(EvaluationMetadata metadata)
+ {
+ var value = metadata.Value;
+ var exception = metadata.Exception;
+
+ if (exception != null)
+ {
+ return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}"));
+ }
+
+ if (value is null)
+ {
+ return Task.FromResult(AssertionResult.Failed("Actual value is null"));
+ }
+
+ var result = value!.ContainsMessage(_needle, _exact);
+ return result
+ ? _passedTask
+ : Task.FromResult(AssertionResult.Failed($"found {value}"));
+ }
+
+ protected override string GetExpectation()
+ {
+ return $"to contain message '{_needle}'";
+ }
+}
+
+public static partial class ArrayTargetAssertionExtensions
+{
+ ///
+ /// Generated extension method for ContainsMessage
+ ///
+ public static StringArray_ContainsMessage_String_Bool_Assertion ContainsMessage(this IAssertionSource source, string needle, bool exact, [CallerArgumentExpression(nameof(needle))] string? needleExpression = null, [CallerArgumentExpression(nameof(exact))] string? exactExpression = null)
+ {
+ source.Context.ExpressionBuilder.Append($".ContainsMessage({needleExpression}, {exactExpression})");
+ return new StringArray_ContainsMessage_String_Bool_Assertion(source.Context, needle, exact);
+ }
+
+}
+
+]
\ No newline at end of file
diff --git a/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet8_0.verified.txt b/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet8_0.verified.txt
new file mode 100644
index 0000000000..2eaba629d7
--- /dev/null
+++ b/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet8_0.verified.txt
@@ -0,0 +1,69 @@
+[
+#nullable enable
+
+using System;
+using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
+using TUnit.Assertions.Core;
+using TUnit.Assertions.Tests.TestData;
+
+namespace TUnit.Assertions.Extensions;
+
+///
+/// Generated assertion for ContainsMessage
+///
+public sealed class StringArray_ContainsMessage_String_Bool_Assertion : Assertion
+{
+ private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed);
+
+ private readonly string _needle;
+ private readonly bool _exact;
+
+ public StringArray_ContainsMessage_String_Bool_Assertion(AssertionContext context, string needle, bool exact)
+ : base(context)
+ {
+ _needle = needle;
+ _exact = exact;
+ }
+
+ protected override Task CheckAsync(EvaluationMetadata metadata)
+ {
+ var value = metadata.Value;
+ var exception = metadata.Exception;
+
+ if (exception != null)
+ {
+ return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}"));
+ }
+
+ if (value is null)
+ {
+ return Task.FromResult(AssertionResult.Failed("Actual value is null"));
+ }
+
+ var result = value!.ContainsMessage(_needle, _exact);
+ return result
+ ? _passedTask
+ : Task.FromResult(AssertionResult.Failed($"found {value}"));
+ }
+
+ protected override string GetExpectation()
+ {
+ return $"to contain message '{_needle}'";
+ }
+}
+
+public static partial class ArrayTargetAssertionExtensions
+{
+ ///
+ /// Generated extension method for ContainsMessage
+ ///
+ public static StringArray_ContainsMessage_String_Bool_Assertion ContainsMessage(this IAssertionSource source, string needle, bool exact, [CallerArgumentExpression(nameof(needle))] string? needleExpression = null, [CallerArgumentExpression(nameof(exact))] string? exactExpression = null)
+ {
+ source.Context.ExpressionBuilder.Append($".ContainsMessage({needleExpression}, {exactExpression})");
+ return new StringArray_ContainsMessage_String_Bool_Assertion(source.Context, needle, exact);
+ }
+
+}
+
+]
\ No newline at end of file
diff --git a/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet9_0.verified.txt b/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet9_0.verified.txt
new file mode 100644
index 0000000000..2eaba629d7
--- /dev/null
+++ b/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet9_0.verified.txt
@@ -0,0 +1,69 @@
+[
+#nullable enable
+
+using System;
+using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
+using TUnit.Assertions.Core;
+using TUnit.Assertions.Tests.TestData;
+
+namespace TUnit.Assertions.Extensions;
+
+///
+/// Generated assertion for ContainsMessage
+///
+public sealed class StringArray_ContainsMessage_String_Bool_Assertion : Assertion
+{
+ private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed);
+
+ private readonly string _needle;
+ private readonly bool _exact;
+
+ public StringArray_ContainsMessage_String_Bool_Assertion(AssertionContext context, string needle, bool exact)
+ : base(context)
+ {
+ _needle = needle;
+ _exact = exact;
+ }
+
+ protected override Task CheckAsync(EvaluationMetadata metadata)
+ {
+ var value = metadata.Value;
+ var exception = metadata.Exception;
+
+ if (exception != null)
+ {
+ return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}"));
+ }
+
+ if (value is null)
+ {
+ return Task.FromResult(AssertionResult.Failed("Actual value is null"));
+ }
+
+ var result = value!.ContainsMessage(_needle, _exact);
+ return result
+ ? _passedTask
+ : Task.FromResult(AssertionResult.Failed($"found {value}"));
+ }
+
+ protected override string GetExpectation()
+ {
+ return $"to contain message '{_needle}'";
+ }
+}
+
+public static partial class ArrayTargetAssertionExtensions
+{
+ ///
+ /// Generated extension method for ContainsMessage
+ ///
+ public static StringArray_ContainsMessage_String_Bool_Assertion ContainsMessage(this IAssertionSource source, string needle, bool exact, [CallerArgumentExpression(nameof(needle))] string? needleExpression = null, [CallerArgumentExpression(nameof(exact))] string? exactExpression = null)
+ {
+ source.Context.ExpressionBuilder.Append($".ContainsMessage({needleExpression}, {exactExpression})");
+ return new StringArray_ContainsMessage_String_Bool_Assertion(source.Context, needle, exact);
+ }
+
+}
+
+]
\ No newline at end of file
diff --git a/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.Net4_7.verified.txt b/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.Net4_7.verified.txt
new file mode 100644
index 0000000000..2eaba629d7
--- /dev/null
+++ b/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.Net4_7.verified.txt
@@ -0,0 +1,69 @@
+[
+#nullable enable
+
+using System;
+using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
+using TUnit.Assertions.Core;
+using TUnit.Assertions.Tests.TestData;
+
+namespace TUnit.Assertions.Extensions;
+
+///
+/// Generated assertion for ContainsMessage
+///
+public sealed class StringArray_ContainsMessage_String_Bool_Assertion : Assertion
+{
+ private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed);
+
+ private readonly string _needle;
+ private readonly bool _exact;
+
+ public StringArray_ContainsMessage_String_Bool_Assertion(AssertionContext context, string needle, bool exact)
+ : base(context)
+ {
+ _needle = needle;
+ _exact = exact;
+ }
+
+ protected override Task CheckAsync(EvaluationMetadata metadata)
+ {
+ var value = metadata.Value;
+ var exception = metadata.Exception;
+
+ if (exception != null)
+ {
+ return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}"));
+ }
+
+ if (value is null)
+ {
+ return Task.FromResult(AssertionResult.Failed("Actual value is null"));
+ }
+
+ var result = value!.ContainsMessage(_needle, _exact);
+ return result
+ ? _passedTask
+ : Task.FromResult(AssertionResult.Failed($"found {value}"));
+ }
+
+ protected override string GetExpectation()
+ {
+ return $"to contain message '{_needle}'";
+ }
+}
+
+public static partial class ArrayTargetAssertionExtensions
+{
+ ///
+ /// Generated extension method for ContainsMessage
+ ///
+ public static StringArray_ContainsMessage_String_Bool_Assertion ContainsMessage(this IAssertionSource source, string needle, bool exact, [CallerArgumentExpression(nameof(needle))] string? needleExpression = null, [CallerArgumentExpression(nameof(exact))] string? exactExpression = null)
+ {
+ source.Context.ExpressionBuilder.Append($".ContainsMessage({needleExpression}, {exactExpression})");
+ return new StringArray_ContainsMessage_String_Bool_Assertion(source.Context, needle, exact);
+ }
+
+}
+
+]
\ No newline at end of file
diff --git a/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.cs b/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.cs
index 565893474b..0f331b922e 100644
--- a/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.cs
+++ b/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.cs
@@ -234,4 +234,21 @@ public Task RefStructParameter() => RunTest(
await Assert.That(mainFile).Contains("value!.Contains(_message)");
});
#endif
+
+ [Test]
+ public Task ArrayTargetType() => RunTest(
+ Path.Combine(Sourcy.Git.RootDirectory.FullName,
+ "TUnit.Assertions.SourceGenerator.Tests",
+ "TestData",
+ "ArrayTargetAssertion.cs"),
+ async generatedFiles =>
+ {
+ await Assert.That(generatedFiles).HasCount(1);
+
+ var mainFile = generatedFiles.FirstOrDefault(f => f.Contains("ContainsMessage"));
+ await Assert.That(mainFile).IsNotNull();
+ // Verify extension method targets IAssertionSource
+ await Assert.That(mainFile!).Contains("IAssertionSource");
+ await Assert.That(mainFile!).Contains("StringArray_ContainsMessage_String_Bool_Assertion");
+ });
}
diff --git a/TUnit.Assertions.SourceGenerator.Tests/TestData/ArrayTargetAssertion.cs b/TUnit.Assertions.SourceGenerator.Tests/TestData/ArrayTargetAssertion.cs
new file mode 100644
index 0000000000..50870f537a
--- /dev/null
+++ b/TUnit.Assertions.SourceGenerator.Tests/TestData/ArrayTargetAssertion.cs
@@ -0,0 +1,16 @@
+using TUnit.Assertions.Attributes;
+
+namespace TUnit.Assertions.Tests.TestData;
+
+///
+/// Test case: GenerateAssertion targeting a concrete array type (string[])
+/// Should generate Assertion class and extension method using IAssertionSource<string[]>
+///
+public static partial class ArrayTargetAssertionExtensions
+{
+ [GenerateAssertion(ExpectationMessage = "to contain message '{needle}'")]
+ public static bool ContainsMessage(this string[] strings, string needle, bool exact = true)
+ {
+ return strings.Any(x => exact ? x == needle : x.Contains(needle));
+ }
+}
diff --git a/TUnit.Assertions.SourceGenerator/Generators/MethodAssertionGenerator.cs b/TUnit.Assertions.SourceGenerator/Generators/MethodAssertionGenerator.cs
index f73d463376..1262671901 100644
--- a/TUnit.Assertions.SourceGenerator/Generators/MethodAssertionGenerator.cs
+++ b/TUnit.Assertions.SourceGenerator/Generators/MethodAssertionGenerator.cs
@@ -1026,6 +1026,12 @@ private static ImmutableEquatableArray GetGenericTypeParameters(ITypeSym
private static string GetSimpleTypeName(ITypeSymbol type)
{
+ // Handle array types: string[] becomes StringArray
+ if (type is IArrayTypeSymbol arrayType)
+ {
+ return $"{GetSimpleTypeName(arrayType.ElementType)}Array";
+ }
+
// Handle special types first
var simpleName = type.SpecialType switch
{
diff --git a/TUnit.Assertions.Tests/GenerateAssertionArrayTests.cs b/TUnit.Assertions.Tests/GenerateAssertionArrayTests.cs
new file mode 100644
index 0000000000..6a319420e7
--- /dev/null
+++ b/TUnit.Assertions.Tests/GenerateAssertionArrayTests.cs
@@ -0,0 +1,43 @@
+using TUnit.Assertions.Attributes;
+
+namespace TUnit.Assertions.Tests;
+
+///
+/// Tests that [GenerateAssertion] works correctly when targeting concrete array types.
+/// The source generator creates an extension method on IAssertionSource<string[]>
+/// and ArrayAssertion<string> (returned by Assert.That(string[])) implements that interface.
+///
+public class GenerateAssertionArrayTests
+{
+ [Test]
+ public async Task ContainsMessage_ExactMatch_Passes()
+ {
+ string[] items = ["food", "bard"];
+ await Assert.That(items).ContainsMessage("food", true);
+ }
+
+ [Test]
+ public async Task ContainsMessage_PartialMatch_Passes()
+ {
+ string[] items = ["food", "bard"];
+ await Assert.That(items).ContainsMessage("foo", false);
+ }
+
+ [Test]
+ public async Task ContainsMessage_NoMatch_Fails()
+ {
+ string[] items = ["food", "bard"];
+ var action = async () => await Assert.That(items).ContainsMessage("xyz", true);
+
+ await Assert.That(action).Throws();
+ }
+}
+
+public static partial class GenerateAssertionArrayTestExtensions
+{
+ [GenerateAssertion(ExpectationMessage = "to contain message '{needle}'")]
+ public static bool ContainsMessage(this string[] strings, string needle, bool exact = true)
+ {
+ return strings.Any(x => exact ? x == needle : x.Contains(needle));
+ }
+}
diff --git a/TUnit.Assertions/Extensions/Assert.cs b/TUnit.Assertions/Extensions/Assert.cs
index f4c9ba9ff4..56ef942c59 100644
--- a/TUnit.Assertions/Extensions/Assert.cs
+++ b/TUnit.Assertions/Extensions/Assert.cs
@@ -190,15 +190,16 @@ public static ListAssertion That(
///
/// Creates an assertion for an array value.
- /// Arrays are routed to CollectionAssertion to preserve array-specific generated assertions.
+ /// Returns ArrayAssertion which implements IAssertionSource<TItem[]>,
+ /// enabling generated assertions that target concrete array types (e.g., string[]).
/// Example: await Assert.That(array).IsSingleElement();
///
[OverloadResolutionPriority(5)]
- public static CollectionAssertion That(
+ public static ArrayAssertion That(
TItem[]? value,
[CallerArgumentExpression(nameof(value))] string? expression = null)
{
- return new CollectionAssertion(value!, expression);
+ return new ArrayAssertion(value, expression);
}
///
diff --git a/TUnit.Assertions/Sources/ArrayAssertion.cs b/TUnit.Assertions/Sources/ArrayAssertion.cs
new file mode 100644
index 0000000000..6efe0fc411
--- /dev/null
+++ b/TUnit.Assertions/Sources/ArrayAssertion.cs
@@ -0,0 +1,30 @@
+using System.Text;
+using TUnit.Assertions.Core;
+
+namespace TUnit.Assertions.Sources;
+
+///
+/// Source assertion for array values.
+/// This is the entry point for: Assert.That(array)
+/// Inherits from CollectionAssertionBase<TItem[], TItem> to get IAssertionSource<TItem[]>,
+/// enabling generated assertions that target concrete array types (e.g., string[]).
+///
+public class ArrayAssertion : CollectionAssertionBase
+{
+ public ArrayAssertion(TItem[]? value, string? expression)
+ : base(new AssertionContext(value!, CreateExpressionBuilder(expression)))
+ {
+ }
+
+ internal ArrayAssertion(AssertionContext context)
+ : base(context)
+ {
+ }
+
+ private static StringBuilder CreateExpressionBuilder(string? expression)
+ {
+ var builder = new StringBuilder();
+ builder.Append($"Assert.That({expression ?? "?"})");
+ return builder;
+ }
+}
diff --git a/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet10_0.verified.txt b/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet10_0.verified.txt
index 59497a2138..915927dc58 100644
--- a/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet10_0.verified.txt
+++ b/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet10_0.verified.txt
@@ -2407,17 +2407,17 @@ namespace .Extensions
public static class ArrayAssertionExtensions
{
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
- public static .Extensions._IsEmpty_Assertion IsEmpty(this . source) { }
+ public static ._IsEmpty_Assertion IsEmpty(this . source) { }
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
- public static .Extensions._IsNotEmpty_Assertion IsNotEmpty(this . source) { }
+ public static ._IsNotEmpty_Assertion IsNotEmpty(this . source) { }
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
public static ._IsNotSingleElement_Assertion IsNotSingleElement(this .<.> source) { }
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
- public static .Extensions._IsNotSingleElement_Assertion IsNotSingleElement(this . source) { }
+ public static ._IsNotSingleElement_Assertion IsNotSingleElement(this . source) { }
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
public static ._IsSingleElement_Assertion IsSingleElement(this .<.> source) { }
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
- public static .Extensions._IsSingleElement_Assertion IsSingleElement(this . source) { }
+ public static ._IsSingleElement_Assertion IsSingleElement(this . source) { }
}
public static class AssemblyAssertionExtensions
{
@@ -3769,11 +3769,11 @@ namespace .Extensions
public static class GenericAssertions
{
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
- public static .Extensions.T_IsIn__Assertion IsIn(this . source, params T[] collection) { }
+ public static .Extensions.T_IsIn_TArray_Assertion IsIn(this . source, params T[] collection) { }
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
public static .Extensions.T_IsIn_IEnumerableT_Assertion IsIn(this . source, . collection, [.("collection")] string? collectionExpression = null) { }
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
- public static .Extensions.T_IsNotIn__Assertion IsNotIn(this . source, params T[] collection) { }
+ public static .Extensions.T_IsNotIn_TArray_Assertion IsNotIn(this . source, params T[] collection) { }
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
public static .Extensions.T_IsNotIn_IEnumerableT_Assertion IsNotIn(this . source, . collection, [.("collection")] string? collectionExpression = null) { }
}
@@ -4855,6 +4855,34 @@ namespace .Extensions
protected override string GetExpectation() { }
}
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
+ public sealed class TArray_IsEmpty_Assertion : .
+ {
+ public TArray_IsEmpty_Assertion(. context) { }
+ protected override .<.> CheckAsync(. metadata) { }
+ protected override string GetExpectation() { }
+ }
+ [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
+ public sealed class TArray_IsNotEmpty_Assertion : .
+ {
+ public TArray_IsNotEmpty_Assertion(. context) { }
+ protected override .<.> CheckAsync(. metadata) { }
+ protected override string GetExpectation() { }
+ }
+ [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
+ public sealed class TArray_IsNotSingleElement_Assertion : .
+ {
+ public TArray_IsNotSingleElement_Assertion(. context) { }
+ protected override .<.> CheckAsync(. metadata) { }
+ protected override string GetExpectation() { }
+ }
+ [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
+ public sealed class TArray_IsSingleElement_Assertion : .
+ {
+ public TArray_IsSingleElement_Assertion(. context) { }
+ protected override .<.> CheckAsync(. metadata) { }
+ protected override string GetExpectation() { }
+ }
+ [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
public sealed class T_IsIn_IEnumerableT_Assertion : .
{
public T_IsIn_IEnumerableT_Assertion(. context, . collection) { }
@@ -4862,9 +4890,9 @@ namespace .Extensions
protected override string GetExpectation() { }
}
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
- public sealed class T_IsIn__Assertion : .
+ public sealed class T_IsIn_TArray_Assertion : .
{
- public T_IsIn__Assertion(. context, T[] collection) { }
+ public T_IsIn_TArray_Assertion(. context, T[] collection) { }
protected override .<.> CheckAsync(. metadata) { }
protected override string GetExpectation() { }
}
@@ -4876,9 +4904,9 @@ namespace .Extensions
protected override string GetExpectation() { }
}
[.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
- public sealed class T_IsNotIn__Assertion : .
+ public sealed class T_IsNotIn_TArray_Assertion : .
{
- public T_IsNotIn__Assertion(. context, T[] collection) { }
+ public T_IsNotIn_TArray_Assertion(. context, T[] collection) { }
protected override .<.> CheckAsync(. metadata) { }
protected override string GetExpectation() { }
}
@@ -5526,37 +5554,13 @@ namespace .Extensions
protected override .<.> CheckAsync(.<> metadata) { }
protected override string GetExpectation() { }
}
- [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
- public sealed class _IsEmpty_Assertion : .
- {
- public _IsEmpty_Assertion(. context) { }
- protected override .<.> CheckAsync(. metadata) { }
- protected override string GetExpectation() { }
- }
- [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
- public sealed class _IsNotEmpty_Assertion : .
- {
- public _IsNotEmpty_Assertion(. context) { }
- protected override .<.> CheckAsync(. metadata) { }
- protected override string GetExpectation() { }
- }
- [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
- public sealed class _IsNotSingleElement_Assertion : .
- {
- public _IsNotSingleElement_Assertion(. context) { }
- protected override .<.> CheckAsync(. metadata) { }
- protected override string GetExpectation() { }
- }
- [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")]
- public sealed class _IsSingleElement_Assertion : .
- {
- public _IsSingleElement_Assertion(. context) { }
- protected override .<.> CheckAsync(. metadata) { }
- protected override string GetExpectation() { }
- }
}
namespace .Sources
{
+ public class ArrayAssertion : .
+ {
+ public ArrayAssertion(TItem[]? value, string? expression) { }
+ }
public class AsyncDelegateAssertion : ., .