From 9b6f76d456729f102a4e934f1a95892b12d989bd Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Mon, 29 Sep 2025 22:57:25 +0100 Subject: [PATCH 1/2] add AOT mode checks to prevent unsupported reflection usage and suppress AOT warnings in reflection classes --- .../Strategies/ReflectionPropertyStrategy.cs | 10 +- .../Building/ReflectionMetadataBuilder.cs | 8 + .../Building/TestDataCollectorFactory.cs | 4 - .../Discovery/ReflectionAttributeExtractor.cs | 27 +- .../ReflectionGenericTypeResolver.cs | 28 +- .../ReflectionHookDiscoveryService.cs | 45 +- .../Discovery/ReflectionTestDataCollector.cs | 69 +- ...ary_Has_No_API_Changes.Net4_7.verified.txt | 3810 +++++++++++------ 8 files changed, 2619 insertions(+), 1382 deletions(-) diff --git a/TUnit.Core/PropertyInjection/Initialization/Strategies/ReflectionPropertyStrategy.cs b/TUnit.Core/PropertyInjection/Initialization/Strategies/ReflectionPropertyStrategy.cs index f5028337d2..581bb2a816 100644 --- a/TUnit.Core/PropertyInjection/Initialization/Strategies/ReflectionPropertyStrategy.cs +++ b/TUnit.Core/PropertyInjection/Initialization/Strategies/ReflectionPropertyStrategy.cs @@ -1,4 +1,5 @@ using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; using System.Threading.Tasks; using TUnit.Core.DataSources; using TUnit.Core.Initialization; @@ -33,6 +34,13 @@ public bool CanHandle(PropertyInitializationContext context) [UnconditionalSuppressMessage("Trimming", "IL2072", Justification = "Reflection mode support")] public async Task InitializePropertyAsync(PropertyInitializationContext context) { +#if NET + if (!RuntimeFeature.IsDynamicCodeSupported) + { + throw new Exception("Using TUnit Reflection mechanisms isn't supported in AOT mode"); + } +#endif + if (context.PropertyInfo == null || context.DataSource == null) { return; @@ -58,4 +66,4 @@ public async Task InitializePropertyAsync(PropertyInitializationContext context) PropertyTrackingService.AddToTestContext(context, resolvedValue); } -} \ No newline at end of file +} diff --git a/TUnit.Engine/Building/ReflectionMetadataBuilder.cs b/TUnit.Engine/Building/ReflectionMetadataBuilder.cs index e33dd190c2..f107b5e958 100644 --- a/TUnit.Engine/Building/ReflectionMetadataBuilder.cs +++ b/TUnit.Engine/Building/ReflectionMetadataBuilder.cs @@ -1,4 +1,5 @@ using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; using TUnit.Core; namespace TUnit.Engine.Building; @@ -20,6 +21,13 @@ public static MethodMetadata CreateMethodMetadata( | DynamicallyAccessedMemberTypes.PublicProperties)] Type type, System.Reflection.MethodInfo method) { +#if NET + if (!RuntimeFeature.IsDynamicCodeSupported) + { + throw new Exception("Using TUnit Reflection mechanisms isn't supported in AOT mode"); + } +#endif + return new MethodMetadata { Name = method.Name, diff --git a/TUnit.Engine/Building/TestDataCollectorFactory.cs b/TUnit.Engine/Building/TestDataCollectorFactory.cs index e027accaf7..8ae93a709d 100644 --- a/TUnit.Engine/Building/TestDataCollectorFactory.cs +++ b/TUnit.Engine/Building/TestDataCollectorFactory.cs @@ -23,8 +23,6 @@ internal static class TestDataCollectorFactory /// Creates a test data collector based on the specified or detected mode. /// Source generation mode is preferred for AOT compatibility. /// - [UnconditionalSuppressMessage("Trimming", "IL2026:Using member 'TUnit.Engine.Discovery.ReflectionTestDataCollector.ReflectionTestDataCollector()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code", Justification = "Reflection mode is explicitly chosen and cannot support trimming")] - [UnconditionalSuppressMessage("AOT", "IL3050:Using member 'TUnit.Engine.Discovery.ReflectionTestDataCollector.ReflectionTestDataCollector()' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling", Justification = "Reflection mode is explicitly chosen and cannot support AOT")] public static ITestDataCollector Create(bool? useSourceGeneration = null, Assembly[]? assembliesToScan = null) { var isSourceGenerationEnabled = useSourceGeneration ?? SourceRegistrar.IsEnabled; @@ -43,8 +41,6 @@ public static ITestDataCollector Create(bool? useSourceGeneration = null, Assemb /// Attempts AOT mode first, falls back to reflection if no source-generated tests found. /// This provides automatic mode selection for optimal performance and compatibility. /// - [UnconditionalSuppressMessage("Trimming", "IL2026:Using member 'TUnit.Engine.Discovery.ReflectionTestDataCollector.ReflectionTestDataCollector()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code", Justification = "Reflection mode is a fallback and cannot support trimming")] - [UnconditionalSuppressMessage("AOT", "IL3050:Using member 'TUnit.Engine.Discovery.ReflectionTestDataCollector.ReflectionTestDataCollector()' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling", Justification = "Reflection mode is a fallback and cannot support AOT")] public static async Task CreateAutoDetectAsync(string testSessionId, Assembly[]? assembliesToScan = null) { // Try AOT mode first (check if any tests were registered) diff --git a/TUnit.Engine/Discovery/ReflectionAttributeExtractor.cs b/TUnit.Engine/Discovery/ReflectionAttributeExtractor.cs index 4c6e29d16b..01b78e1d4e 100644 --- a/TUnit.Engine/Discovery/ReflectionAttributeExtractor.cs +++ b/TUnit.Engine/Discovery/ReflectionAttributeExtractor.cs @@ -1,6 +1,7 @@ using System.Collections.Concurrent; using System.Diagnostics.CodeAnalysis; using System.Reflection; +using System.Runtime.CompilerServices; using TUnit.Core; namespace TUnit.Engine.Discovery; @@ -59,8 +60,15 @@ public override int GetHashCode() /// public static T? GetAttribute(Type testClass, MethodInfo? testMethod = null) where T : Attribute { +#if NET + if (!RuntimeFeature.IsDynamicCodeSupported) + { + throw new Exception("Using TUnit Reflection mechanisms isn't supported in AOT mode"); + } +#endif + var cacheKey = new AttributeCacheKey(testClass, testMethod, typeof(T)); - + return (T?)_attributeCache.GetOrAdd(cacheKey, key => { // Original lookup logic preserved @@ -88,6 +96,13 @@ public override int GetHashCode() /// public static IEnumerable GetAttributes(Type testClass, MethodInfo? testMethod = null) where T : Attribute { +#if NET + if (!RuntimeFeature.IsDynamicCodeSupported) + { + throw new Exception("Using TUnit Reflection mechanisms isn't supported in AOT mode"); + } +#endif + var attributes = new List(); attributes.AddRange(testClass.Assembly.GetCustomAttributes()); @@ -104,7 +119,7 @@ public static IEnumerable GetAttributes(Type testClass, MethodInfo? testMe public static string[] ExtractCategories(Type testClass, MethodInfo testMethod) { var categories = new HashSet(); - + foreach (var attr in GetAttributes(testClass, testMethod)) { categories.Add(attr.Category); @@ -128,7 +143,7 @@ public static bool CanRunInParallel(Type testClass, MethodInfo testMethod) public static TestDependency[] ExtractDependencies(Type testClass, MethodInfo testMethod) { var dependencies = new List(); - + foreach (var attr in GetAttributes(testClass, testMethod)) { dependencies.Add(attr.ToTestDependency()); @@ -155,13 +170,13 @@ public static IDataSourceAttribute[] ExtractDataSources(ICustomAttributeProvider public static Attribute[] GetAllAttributes(Type testClass, MethodInfo testMethod) { var attributes = new List(); - + // Add in reverse order of precedence so method attributes come first // This ensures ScopedAttributeFilter will keep method-level attributes over class/assembly attributes.AddRange(testMethod.GetCustomAttributes()); attributes.AddRange(testClass.GetCustomAttributes()); attributes.AddRange(testClass.Assembly.GetCustomAttributes()); - + return attributes.ToArray(); } @@ -193,4 +208,4 @@ public static PropertyDataSource[] ExtractPropertyDataSources([DynamicallyAccess return propertyDataSources.ToArray(); } -} \ No newline at end of file +} diff --git a/TUnit.Engine/Discovery/ReflectionGenericTypeResolver.cs b/TUnit.Engine/Discovery/ReflectionGenericTypeResolver.cs index 2c485f2ee2..8b6974cd92 100644 --- a/TUnit.Engine/Discovery/ReflectionGenericTypeResolver.cs +++ b/TUnit.Engine/Discovery/ReflectionGenericTypeResolver.cs @@ -1,5 +1,6 @@ using System.Diagnostics.CodeAnalysis; using System.Reflection; +using System.Runtime.CompilerServices; using TUnit.Core; namespace TUnit.Engine.Discovery; @@ -7,7 +8,13 @@ namespace TUnit.Engine.Discovery; /// /// Handles generic type resolution and instantiation for reflection-based test discovery /// -[RequiresUnreferencedCode("Reflection-based generic type resolution requires unreferenced code")] +[UnconditionalSuppressMessage("Trimming", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "Reflection mode cannot support trimming")] +[UnconditionalSuppressMessage("Trimming", "IL2055:Call to 'System.Type.MakeGenericType' can not be statically analyzed", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2065:Value passed to implicit 'this' parameter of method can not be statically determined and may not meet 'DynamicallyAccessedMembersAttribute' requirements", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2067:Target parameter does not satisfy annotation requirements", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2070:Target method does not satisfy annotation requirements", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2075:'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethods(BindingFlags)'", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", Justification = "Reflection mode cannot support AOT")] internal static class ReflectionGenericTypeResolver { /// @@ -15,6 +22,13 @@ internal static class ReflectionGenericTypeResolver /// public static Type[]? DetermineGenericTypeArguments(Type genericTypeDefinition, object?[] dataRow) { +#if NET + if (!RuntimeFeature.IsDynamicCodeSupported) + { + throw new Exception("Using TUnit Reflection mechanisms isn't supported in AOT mode"); + } +#endif + var genericParameters = genericTypeDefinition.GetGenericArguments(); // If no data row or empty data, can't determine types @@ -68,9 +82,6 @@ internal static class ReflectionGenericTypeResolver /// /// Extracts generic type information including constraints /// - [UnconditionalSuppressMessage("Trimming", - "IL2065:Value passed to implicit 'this' parameter of method 'System.Type.GetInterfaces()' can not be statically determined and may not meet 'DynamicallyAccessedMembersAttribute' requirements", - Justification = "Reflection mode requires dynamic access")] public static GenericTypeInfo? ExtractGenericTypeInfo(Type testClass) { if (!testClass.IsGenericTypeDefinition) @@ -106,9 +117,6 @@ internal static class ReflectionGenericTypeResolver /// /// Extracts generic method information including parameter positions /// - [UnconditionalSuppressMessage("Trimming", - "IL2065:Value passed to implicit 'this' parameter of method 'System.Type.GetInterfaces()' can not be statically determined and may not meet 'DynamicallyAccessedMembersAttribute' requirements", - Justification = "Reflection mode requires dynamic access")] public static GenericMethodInfo? ExtractGenericMethodInfo(MethodInfo method) { if (!method.IsGenericMethodDefinition) @@ -157,10 +165,6 @@ internal static class ReflectionGenericTypeResolver /// /// Creates a concrete type from a generic type definition and validates the type arguments /// - [UnconditionalSuppressMessage("Trimming", "IL2055:Call to 'System.Type.MakeGenericType' can not be statically analyzed", - Justification = "Reflection mode requires dynamic access")] - [UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", - Justification = "Reflection mode cannot support AOT")] public static Type CreateConcreteType(Type genericTypeDefinition, Type[] typeArguments) { var genericParams = genericTypeDefinition.GetGenericArguments(); @@ -174,4 +178,4 @@ public static Type CreateConcreteType(Type genericTypeDefinition, Type[] typeArg return genericTypeDefinition.MakeGenericType(typeArguments); } -} \ No newline at end of file +} diff --git a/TUnit.Engine/Discovery/ReflectionHookDiscoveryService.cs b/TUnit.Engine/Discovery/ReflectionHookDiscoveryService.cs index a9781b19b2..7ac904fb0e 100644 --- a/TUnit.Engine/Discovery/ReflectionHookDiscoveryService.cs +++ b/TUnit.Engine/Discovery/ReflectionHookDiscoveryService.cs @@ -1,6 +1,7 @@ using System.Collections.Concurrent; using System.Diagnostics.CodeAnalysis; using System.Reflection; +using System.Runtime.CompilerServices; using TUnit.Core; using TUnit.Core.Hooks; using TUnit.Core.Interfaces; @@ -10,8 +11,13 @@ namespace TUnit.Engine.Discovery; /// /// Discovers hooks at runtime using reflection for VB.NET and other languages that don't support source generation. /// -[RequiresUnreferencedCode("Reflection-based hook discovery requires unreferenced code")] -[RequiresDynamicCode("Hook invocation may require dynamic code generation")] +[UnconditionalSuppressMessage("Trimming", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "Reflection mode cannot support trimming")] +[UnconditionalSuppressMessage("Trimming", "IL2055:Call to 'System.Type.MakeGenericType' can not be statically analyzed", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2067:Target parameter does not satisfy annotation requirements", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2070:Target method does not satisfy annotation requirements", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2072:Target parameter argument does not satisfy 'DynamicallyAccessedMembersAttribute' requirements", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2075:'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethods(BindingFlags)'", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", Justification = "Reflection mode cannot support AOT")] internal sealed class ReflectionHookDiscoveryService { private static readonly ConcurrentDictionary _scannedAssemblies = new(); @@ -19,8 +25,15 @@ internal sealed class ReflectionHookDiscoveryService public static void DiscoverHooks() { +#if NET + if (!RuntimeFeature.IsDynamicCodeSupported) + { + throw new Exception("Using TUnit Reflection mechanisms isn't supported in AOT mode"); + } +#endif + var assemblies = AppDomain.CurrentDomain.GetAssemblies(); - + foreach (var assembly in assemblies) { if (ShouldScanAssembly(assembly)) @@ -44,7 +57,7 @@ private static bool ShouldScanAssembly(Assembly assembly) } // Skip system and framework assemblies - if (name.StartsWith("System.") || + if (name.StartsWith("System.") || name.StartsWith("Microsoft.") || name == "mscorlib" || name == "netstandard" || @@ -54,9 +67,9 @@ private static bool ShouldScanAssembly(Assembly assembly) } // Skip TUnit framework assemblies (but not test projects) - if (name == "TUnit" || - name == "TUnit.Core" || - name == "TUnit.Engine" || + if (name == "TUnit" || + name == "TUnit.Core" || + name == "TUnit.Engine" || name == "TUnit.Assertions") { return false; @@ -92,7 +105,7 @@ private static void DiscoverHooksInAssembly(Assembly assembly) try { var types = assembly.GetTypes(); - + foreach (var type in types) { DiscoverHooksInType(type, assembly); @@ -107,7 +120,7 @@ private static void DiscoverHooksInAssembly(Assembly assembly) private static void DiscoverHooksInType(Type type, Assembly assembly) { var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static); - + foreach (var method in methods) { // Check for Before attributes @@ -144,7 +157,7 @@ private static void RegisterBeforeHook(Type type, MethodInfo method, BeforeAttri { var hookType = attr.HookType; var order = attr.Order; - + switch (hookType) { case HookType.Test: @@ -206,7 +219,7 @@ private static void RegisterAfterHook(Type type, MethodInfo method, AfterAttribu { var hookType = attr.HookType; var order = attr.Order; - + switch (hookType) { case HookType.Test: @@ -268,7 +281,7 @@ private static void RegisterBeforeEveryHook(Type type, MethodInfo method, Before { var hookType = attr.HookType; var order = attr.Order; - + switch (hookType) { case HookType.Test: @@ -343,7 +356,7 @@ private static void RegisterAfterEveryHook(Type type, MethodInfo method, AfterEv { var hookType = attr.HookType; var order = attr.Order; - + switch (hookType) { case HookType.Test: @@ -574,7 +587,7 @@ private static Func CreateIns } var result = method.Invoke(instance, args); - + if (result is Task task) { await task; @@ -619,7 +632,7 @@ private static Func CreateHookDelegate(Type } var result = method.Invoke(instance, args); - + if (result is Task task) { await task; @@ -664,4 +677,4 @@ public ValueTask ExecuteBeforeTestSessionHook(MethodMetadata testMethod, TestSes public ValueTask ExecuteAfterTestSessionHook(MethodMetadata testMethod, TestSessionContext context, Func action) => action(); -} \ No newline at end of file +} diff --git a/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs b/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs index 5017edca0c..9ddeb6675c 100644 --- a/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs +++ b/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs @@ -12,9 +12,16 @@ namespace TUnit.Engine.Discovery; /// Discovers tests at runtime using reflection with assembly scanning and caching -[RequiresUnreferencedCode("Reflection-based test discovery requires unreferenced code")] -[RequiresDynamicCode("Expression compilation requires dynamic code generation")] -[SuppressMessage("Trimming", "IL2077:Target parameter argument does not satisfy \'DynamicallyAccessedMembersAttribute\' in call to target method. The source field does not have matching annotations.")] +[UnconditionalSuppressMessage("SingleFile", "IL3000:Avoid accessing Assembly file path when publishing as a single file", Justification = "Reflection mode is not supported in single-file deployments")] +[UnconditionalSuppressMessage("Trimming", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "Reflection mode cannot support trimming")] +[UnconditionalSuppressMessage("Trimming", "IL2055:Call to 'System.Type.MakeGenericType' can not be statically analyzed", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2060:Call to method can not be statically analyzed", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2067:Target parameter does not satisfy annotation requirements", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2070:Target method does not satisfy annotation requirements", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2072:Target parameter argument does not satisfy 'DynamicallyAccessedMembersAttribute' requirements", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2075:'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethods(BindingFlags)'", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("Trimming", "IL2077:Target parameter argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to target method. The source field does not have matching annotations.", Justification = "Reflection mode requires dynamic access")] +[UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", Justification = "Reflection mode cannot support AOT")] internal sealed class ReflectionTestDataCollector : ITestDataCollector { private static readonly ConcurrentDictionary _scannedAssemblies = new(); @@ -22,10 +29,10 @@ internal sealed class ReflectionTestDataCollector : ITestDataCollector private static readonly Lock _resultsLock = new(); // Only for final results aggregation private static readonly ConcurrentDictionary _assemblyTypesCache = new(); private static readonly ConcurrentDictionary _typeMethodsCache = new(); - + private static Assembly[]? _cachedAssemblies; private static readonly Lock _assemblyCacheLock = new(); - + private static Assembly[] GetCachedAssemblies() { lock (_assemblyCacheLock) @@ -33,7 +40,7 @@ private static Assembly[] GetCachedAssemblies() return _cachedAssemblies ??= AppDomain.CurrentDomain.GetAssemblies(); } } - + public static void ClearCaches() { _scannedAssemblies.Clear(); @@ -75,6 +82,13 @@ private async Task> ProcessAssemblyAsync(Assembly assembly, S public async Task> CollectTestsAsync(string testSessionId) { +#if NET + if (!RuntimeFeature.IsDynamicCodeSupported) + { + throw new Exception("Using TUnit Reflection mechanisms isn't supported in AOT mode"); + } +#endif + var allAssemblies = GetCachedAssemblies(); var assembliesList = new List(allAssemblies.Length); foreach (var assembly in allAssemblies) @@ -277,9 +291,7 @@ private static bool ShouldScanAssembly(Assembly assembly) try { -#pragma warning disable IL3000 // Avoid accessing Assembly file path when publishing as a single file var location = assembly.Location; -#pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file if (!string.IsNullOrEmpty(location) && (location.Contains("ref") || location.Contains("runtimes") || @@ -306,7 +318,7 @@ private static bool ShouldScanAssembly(Assembly assembly) break; } } - + if (!hasTUnitReference) { return false; @@ -315,12 +327,6 @@ private static bool ShouldScanAssembly(Assembly assembly) return true; } - [UnconditionalSuppressMessage("Trimming", - "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", - Justification = "Reflection mode cannot support trimming")] - [UnconditionalSuppressMessage("Trimming", - "IL2075:'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethods(BindingFlags)'", - Justification = "Reflection mode requires dynamic access")] private static async Task> DiscoverTestsInAssembly(Assembly assembly) { var discoveredTests = new List(100); @@ -419,12 +425,6 @@ private static async Task> DiscoverTestsInAssembly(Assembly a return discoveredTests; } - [UnconditionalSuppressMessage("Trimming", - "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", - Justification = "Reflection mode cannot support trimming")] - [UnconditionalSuppressMessage("Trimming", - "IL2075:'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethods(BindingFlags)'", - Justification = "Reflection mode requires dynamic access")] private static async IAsyncEnumerable DiscoverTestsInAssemblyStreamingAsync( Assembly assembly, [EnumeratorCancellation] CancellationToken cancellationToken = default) @@ -564,11 +564,6 @@ private static async IAsyncEnumerable DiscoverTestsInAssemblyStrea } } - [UnconditionalSuppressMessage("Trimming", "IL2055:Call to 'System.Type.MakeGenericType' can not be statically analyzed", - Justification = "Reflection mode requires dynamic access")] - [UnconditionalSuppressMessage("Trimming", - "IL2067:'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Activator.CreateInstance(Type)'", - Justification = "Reflection mode requires dynamic access")] private static async Task> DiscoverGenericTests(Type genericTypeDefinition) { var discoveredTests = new List(100); @@ -658,11 +653,6 @@ private static async Task> DiscoverGenericTests(Type genericT return discoveredTests; } - [UnconditionalSuppressMessage("Trimming", "IL2055:Call to 'System.Type.MakeGenericType' can not be statically analyzed", - Justification = "Reflection mode requires dynamic access")] - [UnconditionalSuppressMessage("Trimming", - "IL2067:'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Activator.CreateInstance(Type)'", - Justification = "Reflection mode requires dynamic access")] private static async IAsyncEnumerable DiscoverGenericTestsStreamingAsync( Type genericTypeDefinition, [EnumeratorCancellation] CancellationToken cancellationToken = default) @@ -914,12 +904,6 @@ private static string GenerateTestName(Type testClass, MethodInfo testMethod) - [UnconditionalSuppressMessage("Trimming", - "IL2070:'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructors()'", - Justification = "Reflection mode requires dynamic access")] - [UnconditionalSuppressMessage("Trimming", - "IL2067:Target parameter does not satisfy annotation requirements", - Justification = "Reflection mode requires dynamic access")] private static Func CreateInstanceFactory([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type testClass) { // For generic types, we need to handle MakeGenericType @@ -1177,7 +1161,6 @@ public override Func /// Creates a reflection-based instance factory with proper AOT attribution /// - [UnconditionalSuppressMessage("Trimming", "IL2067:Target parameter does not satisfy annotation requirements", Justification = "Reflection mode requires dynamic access")] private static Func CreateReflectionInstanceFactory(ConstructorInfo ctor) { var isPrepared = false; @@ -1378,8 +1361,6 @@ private static bool IsCovariantCompatible(Type paramType, Type argType) /// /// Creates a reflection-based test invoker with proper AOT attribution /// - [UnconditionalSuppressMessage("Trimming", "IL2070:Target method does not satisfy annotation requirements", Justification = "Reflection mode requires dynamic access")] - [UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", Justification = "Reflection mode cannot support AOT")] private static Func CreateReflectionTestInvoker(Type testClass, MethodInfo testMethod) { var isPrepared = false; @@ -1457,13 +1438,13 @@ private static bool IsCovariantCompatible(Type paramType, Type argType) // Check if the last parameter is a params array var lastParam = parameters.Length > 0 ? parameters[^1] : null; var isParamsArray = lastParam != null && lastParam.IsDefined(typeof(ParamArrayAttribute), false); - + if (isParamsArray && lastParam != null) { // Handle params array parameter var paramsElementType = lastParam.ParameterType.GetElementType(); var regularParamsCount = parameters.Length - 1; - + // Process regular parameters first for (var i = 0; i < regularParamsCount && i < args.Length; i++) { @@ -1495,11 +1476,11 @@ private static bool IsCovariantCompatible(Type paramType, Type argType) castedArgs[i] = CastHelper.Cast(paramType, arg); } } - + // Collect remaining arguments into params array var paramsStartIndex = regularParamsCount; var paramsCount = Math.Max(0, args.Length - paramsStartIndex); - + if (paramsElementType != null) { var paramsArray = Array.CreateInstance(paramsElementType, paramsCount); diff --git a/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.Net4_7.verified.txt b/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.Net4_7.verified.txt index 46cd1ed6cb..33cb8d502b 100644 --- a/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.Net4_7.verified.txt +++ b/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.Net4_7.verified.txt @@ -5,34 +5,39 @@ namespace { public static void Fail(string reason) { } public static Multiple() { } - public static .<> That( action, [.("action")] string? doNotPopulateThisValue = null) { } - public static .<., object> That(.IEnumerable enumerable, [.("enumerable")] string? doNotPopulateThisValue = null) { } - public static .<<.>> That(<.> asyncAction, [.("asyncAction")] string? doNotPopulateThisValue = null) { } - public static .<<.>> That(. task, [.("task")] string? doNotPopulateThisValue = null) { } - public static .<<.>> That(. valueTask, [.("valueTask")] string? doNotPopulateThisValue = null) { } - public static .<., T> That(. enumerable, [.("enumerable")] string? doNotPopulateThisValue = null) { } - public static .<., T> That(. list, [.("list")] string? doNotPopulateThisValue = null) { } - public static .<., T> That(<.> func, [.("func")] string? doNotPopulateThisValue = null) { } - public static .<., T> That(<.> func, [.("func")] string? doNotPopulateThisValue = null) { } - public static .<., T> That(<.<.>> asyncFunc, [.("asyncFunc")] string? doNotPopulateThisValue = null) { } - public static .<., T> That(<.<.>> asyncFunc, [.("asyncFunc")] string? doNotPopulateThisValue = null) { } - public static . That(<.> asyncFunc, [.("asyncFunc")] string? doNotPopulateThisValue = null) { } - public static . That(<.> asyncFunc, [.("asyncFunc")] string? doNotPopulateThisValue = null) { } - public static . That( func, [.("func")] string? doNotPopulateThisValue = null) { } - public static . That( func, [.("func")] string? doNotPopulateThisValue = null) { } - public static . That(. task, [.("task")] string? doNotPopulateThisValue = null) { } - public static . That(. valueTask, [.("valueTask")] string? doNotPopulateThisValue = null) { } + public static . That( value, [.("value")] string? doNotPopulateThisValue = null) { } + public static .<.> That(.IEnumerable enumerable, [.("enumerable")] string? doNotPopulateThisValue = null) { } + public static . That(<.> value, [.("value")] string? doNotPopulateThisValue = null) { } + public static . That(. value, [.("value")] string? doNotPopulateThisValue = null) { } + public static . That(. value, [.("value")] string? doNotPopulateThisValue = null) { } + public static . That(<.> value, [.("value")] string? doNotPopulateThisValue = null) { } + public static . That( value, [.("value")] string? doNotPopulateThisValue = null) { } + public static . That(. value, [.("value")] string? doNotPopulateThisValue = null) { } + public static . That(. value, [.("value")] string? doNotPopulateThisValue = null) { } public static . That(TActual value, [.("value")] string? doNotPopulateThisValue = null) { } - public static . That(TElement[] array, [.("array")] string? doNotPopulateThisValue = null) { } - public static . Throws( @delegate, [.("delegate")] string? doNotPopulateThisValue = null) { } - public static . Throws( exceptionType, @delegate, [.("delegate")] string? doNotPopulateThisValue = null) { } - public static . Throws( @delegate, [.("delegate")] string? doNotPopulateThisValue = null) + public static Throws( @delegate, [.("delegate")] string? doNotPopulateThisValue = null) { } + public static Throws( type, @delegate, [.("delegate")] string? doNotPopulateThisValue = null) { } + public static TException Throws( @delegate, [.("delegate")] string? doNotPopulateThisValue = null) where TException : { } - public static . ThrowsAsync(<.> @delegate, [.("delegate")] string? doNotPopulateThisValue = null) { } - public static . ThrowsAsync(. task, [.("task")] string? doNotPopulateThisValue = null) { } - public static . ThrowsAsync(. valueTask, [.("valueTask")] string? doNotPopulateThisValue = null) { } - public static . ThrowsAsync( exceptionType, <.> @delegate, [.("delegate")] string? doNotPopulateThisValue = null) { } - public static . ThrowsAsync(<.> @delegate, [.("delegate")] string? doNotPopulateThisValue = null) + public static TException Throws(string parameterName, @delegate, [.("delegate")] string? doNotPopulateThisValue = null) + where TException : { } + public static . ThrowsAsync(<.> @delegate, [.("delegate")] string? doNotPopulateThisValue = null) { } + public static . ThrowsAsync(. @delegate, [.("delegate")] string? doNotPopulateThisValue = null) { } + public static . ThrowsAsync(. @delegate, [.("delegate")] string? doNotPopulateThisValue = null) { } + public static . ThrowsAsync( type, <.> @delegate, [.("delegate")] string? doNotPopulateThisValue = null) { } + public static . ThrowsAsync( type, . @delegate, [.("delegate")] string? doNotPopulateThisValue = null) { } + public static . ThrowsAsync( type, . @delegate, [.("delegate")] string? doNotPopulateThisValue = null) { } + public static . ThrowsAsync(<.> @delegate, [.("delegate")] string? doNotPopulateThisValue = null) + where TException : { } + public static . ThrowsAsync(. @delegate, [.("delegate")] string? doNotPopulateThisValue = null) + where TException : { } + public static . ThrowsAsync(. @delegate, [.("delegate")] string? doNotPopulateThisValue = null) + where TException : { } + public static . ThrowsAsync(string parameterName, <.> @delegate, [.("delegate")] string? doNotPopulateThisValue = null, [.("parameterName")] string? doNotPopulateThisValue2 = null) + where TException : { } + public static . ThrowsAsync(string parameterName, . @delegate, [.("delegate")] string? doNotPopulateThisValue = null, [.("parameterName")] string? doNotPopulateThisValue2 = null) + where TException : { } + public static . ThrowsAsync(string parameterName, . @delegate, [.("delegate")] string? doNotPopulateThisValue = null, [.("parameterName")] string? doNotPopulateThisValue2 = null) where TException : { } } public readonly struct AssertionData : <.AssertionData> @@ -58,6 +63,13 @@ namespace public required EndTime { get; init; } public required StartTime { get; init; } } + public class CollectionWrapper + { + public CollectionWrapper(..IValueSource<.> valueSource) { } + public .<.> Satisfy(<..IValueSource, .> assert, [.("assert")] string assertionBuilderExpression = "") { } + public .<.> Satisfy(?> asyncMapper, <..IValueSource, .> assert, [.("asyncMapper")] string mapperExpression = "", [.("assert")] string assertionBuilderExpression = "") { } + public .<.> Satisfy( mapper, <..IValueSource, .> assert, [.("mapper")] string mapperExpression = "", [.("assert")] string assertionBuilderExpression = "") { } + } public static class Compare { public static .<.ComparisonFailure> CheckEquivalent(TActual actual, TExpected expected, .CompareOptions options, int? index) { } @@ -164,6 +176,13 @@ namespace .AssertConditions protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } public void WithComparer( comparer) { } } + public class EnumerableSatisfiesAssertCondition : . + where TActual : . + { + public EnumerableSatisfiesAssertCondition(?> mapper, <..IValueSource, .> assertionBuilder, string mapperExpression, string assertionBuilderExpression) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } public abstract class ExpectedExceptionDelegateAssertCondition : . { protected ExpectedExceptionDelegateAssertCondition() { } @@ -210,6 +229,12 @@ namespace .AssertConditions protected override string GetExpectation() { } protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } } + public class SatisfiesAssertCondition : . + { + public SatisfiesAssertCondition(?> mapper, <..IValueSource, .> assertionBuilder, string mapperExpression, string assertionBuilderExpression) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } public class StaticMethodAssertCondition : . { public StaticMethodAssertCondition( predicate, string methodName, bool negated = false) { } @@ -246,6 +271,151 @@ namespace .AssertConditions } } namespace . +{ + public class DateTimeEqualsExpectedValueAssertCondition : .<, > + { + public DateTimeEqualsExpectedValueAssertCondition( expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, expectedValue) { } + public void SetTolerance( tolerance) { } + } + public class DateTimeOffsetEqualsExpectedValueAssertCondition : .<, > + { + public DateTimeOffsetEqualsExpectedValueAssertCondition( expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, expectedValue) { } + public void SetTolerance( tolerance) { } + } + public class TimeSpanEqualsExpectedValueAssertCondition : .<, > + { + public TimeSpanEqualsExpectedValueAssertCondition( expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, expectedValue) { } + public void SetTolerance( tolerance) { } + } +} +namespace . +{ + public class Member + { + public Member(..IValueSource valueSource, .<> selector) { } + public . EqualTo(TPropertyType expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . NotEqualTo(TPropertyType expected, [.("expected")] string? doNotPopulateThisValue = null) { } + } + public class PropertyEqualsExpectedValueAssertCondition : . + { + public PropertyEqualsExpectedValueAssertCondition(.<> propertySelector, TPropertyType expected, bool isEqual) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TRootObjectType? actualValue, TPropertyType? expectedValue) { } + } +} +namespace . +{ + public class EnumerableAllExpectedFuncAssertCondition : . + where TActual : . + { + public EnumerableAllExpectedFuncAssertCondition( matcher, string? matcherString) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EnumerableContainsExpectedFuncAssertCondition : . + where TActual : . + { + public EnumerableContainsExpectedFuncAssertCondition( matcher, string? matcherString) { } + public TInner FoundItem { get; } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EnumerableContainsExpectedValueAssertCondition : . + where TActual : . + { + public EnumerableContainsExpectedValueAssertCondition(TInner expected, .? equalityComparer) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, TInner? inner) { } + } + public class EnumerableCountEqualToExpectedValueAssertCondition : . + where TActual : . + { + public EnumerableCountEqualToExpectedValueAssertCondition(int expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, int count) { } + } + public class EnumerableCountNotEqualToExpectedValueAssertCondition : . + where TActual : . + { + public EnumerableCountNotEqualToExpectedValueAssertCondition(int expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, int count) { } + } + public class EnumerableDistinctItemsExpectedValueAssertCondition : . + where TActual : . + { + public EnumerableDistinctItemsExpectedValueAssertCondition(.? equalityComparer) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EnumerableEquivalentToExpectedValueAssertCondition : .> + where TActual : .? + { + public EnumerableEquivalentToExpectedValueAssertCondition(.? expected, . equalityComparer, . collectionOrdering) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, .? expectedValue) { } + } + public class EnumerableNotContainsExpectedFuncAssertCondition : . + where TActual : . + { + public EnumerableNotContainsExpectedFuncAssertCondition( matcher, string? matcherString) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EnumerableNotContainsExpectedValueAssertCondition : . + where TActual : . + { + public EnumerableNotContainsExpectedValueAssertCondition(TInner expected, .? equalityComparer) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, TInner? inner) { } + } + public class EnumerableNotEquivalentToExpectedValueAssertCondition : .> + where TActual : .? + { + public EnumerableNotEquivalentToExpectedValueAssertCondition(.? expected, . equalityComparer, . collectionOrdering) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, .? expectedValue) { } + } + public class EnumerableOrderedByAssertCondition : . + where TActual : . + { + public EnumerableOrderedByAssertCondition(. comparer, comparisonItemSelector, . order) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class PropertyOrMethodAccessor + { + public PropertyOrMethodAccessor() { } + } +} +namespace . +{ + public class BetweenAssertCondition : . + where TActual : + { + public BetweenAssertCondition(TActual minimum, TActual maximum) { } + public void Exclusive() { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + public void Inclusive() { } + } + public class NotBetweenAssertCondition : . + where TActual : + { + public NotBetweenAssertCondition(TActual minimum, TActual maximum) { } + public void Exclusive() { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + public void Inclusive() { } + } +} +namespace . { public class ExceptionMessageContainingExpectedValueAssertCondition : . where TException : @@ -282,15 +452,30 @@ namespace . protected override string GetExpectation() { } protected override .<.> GetResult(TException? actualValue, string? expectedValue) { } } - public class ExceptionTypeAssertCondition : .<, > - { - public ExceptionTypeAssertCondition( expectedType) { } - protected override string GetExpectation() { } - protected override .<.> GetResult(? actualValue, ? expectedValue) { } - } } namespace . { + public class ConvertedDelegateSource : ..ISource, ..IValueSource + where TToType : + { + public ConvertedDelegateSource(..IDelegateSource source) { } + public string? ActualExpression { get; } + public .<.AssertionData> AssertionDataTask { get; } + public .<.> Assertions { get; } + public .StringBuilder ExpressionBuilder { get; } + public ..ISource AppendExpression(string expression) { } + public ..ISource WithAssertion(. assertCondition) { } + } + public class ConvertedValueSource : ..ISource, ..IValueSource + { + public ConvertedValueSource(..IValueSource source, . convertToAssertCondition) { } + public string? ActualExpression { get; } + public .<.AssertionData> AssertionDataTask { get; } + public .<.> Assertions { get; } + public .StringBuilder ExpressionBuilder { get; } + public ..ISource AppendExpression(string expression) { } + public ..ISource WithAssertion(. assertCondition) { } + } public interface IDelegateSource : ..ISource { } public interface ISource { @@ -339,1036 +524,608 @@ namespace . public ValueOr(. assertionBuilder) { } } } +namespace . +{ + public class StringEqualsExpectedValueAssertCondition : . + { + public StringEqualsExpectedValueAssertCondition(string expected, stringComparison) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, string? expectedValue) { } + public ..StringEqualsExpectedValueAssertCondition IgnoringWhitespace() { } + public ..StringEqualsExpectedValueAssertCondition WithNullAndEmptyEquality() { } + public ..StringEqualsExpectedValueAssertCondition WithTrimming() { } + } + public class StringNotContainsExpectedValueAssertCondition : . + { + public StringNotContainsExpectedValueAssertCondition(string expected, stringComparison) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, string? expectedValue) { } + } + public class StringNotEqualsExpectedValueAssertCondition : . + { + public StringNotEqualsExpectedValueAssertCondition(string expected, stringComparison) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, string? expectedValue) { } + } +} +namespace . +{ + public class ThrowsAnyExceptionAssertCondition : . + { + public ThrowsAnyExceptionAssertCondition() { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ThrowsExactTypeOfDelegateAssertCondition : . + where TExpectedException : + { + public ThrowsExactTypeOfDelegateAssertCondition() { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ThrowsNothingAssertCondition : . + { + public ThrowsNothingAssertCondition() { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ThrowsOfTypeAssertCondition : . + { + public ThrowsOfTypeAssertCondition( type) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(object? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ThrowsOfTypeAssertCondition : . + where TExpectedException : + { + public ThrowsOfTypeAssertCondition() { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ThrowsWithMessageAssertCondition : . + where TException : + { + public ThrowsWithMessageAssertCondition(string expectedMessage, stringComparison, exceptionSelector) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ThrowsWithMessageContainingAssertCondition : . + where TException : + { + public ThrowsWithMessageContainingAssertCondition(string expected, stringComparison, exceptionSelector) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ThrowsWithMessageMatchingAssertCondition : . + where TException : + { + public ThrowsWithMessageMatchingAssertCondition(. match, exceptionSelector) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ThrowsWithMessageNotContainingAssertCondition : . + where TException : + { + public ThrowsWithMessageNotContainingAssertCondition(string expected, stringComparison, exceptionSelector) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ThrowsWithParamNameAssertCondition : . + where TException : + { + public ThrowsWithParamNameAssertCondition(string expectedParamName, stringComparison, exceptionSelector) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ThrowsWithinAssertCondition : . + where TExpectedException : + { + public ThrowsWithinAssertCondition( timeSpan) { } + public override ? WaitFor { get; } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } +} namespace .AssertionBuilders { - public abstract class AssertionBase - { - protected AssertionBase() { } - public abstract . ExecuteAsync(); - public abstract . GetAwaiter(); - } - public abstract class AssertionBase : . - { - protected AssertionBase(<.> actualValueProvider) { } - protected AssertionBase( actualValueProvider) { } - protected AssertionBase(. actualValueTask) { } - protected AssertionBase(T actualValue) { } - public virtual . And { get; } - public virtual . Or { get; } - protected abstract .<.> AssertAsync(); - public virtual . Because(string reason, [.("reason")] string? expression = null) { } - public override . ExecuteAsync() { } - protected . GetActualValueAsync() { } - public override . GetAwaiter() { } - } - public abstract class AssertionBuilder : . - { - protected AssertionBuilder() { } - public virtual string? ActualExpression { get; protected set; } - public virtual void AppendExpression(string expression) { } + public class AndAssertionBuilder : ., . { } + public abstract class AssertionBuilder : ..ISource + { + protected .AssertionData? AwaitedAssertionData; + protected .? OtherTypeAssertionBuilder; + protected readonly .<.> Results; + public AssertionBuilder(..ISource source) { } + public AssertionBuilder(.<.AssertionData> assertionDataTask, string? actualExpression) { } + public AssertionBuilder(.<.AssertionData> assertionDataTask, string actualExpression, .StringBuilder expressionBuilder, .<.> assertions) { } + protected void AppendCallerMethod(string?[] expressions, [.] string methodName = "") { } [.DebuggerHidden] [("This is a base `object` method that should not be called.", true)] public new void Equals(object? obj) { } - public abstract .<.AssertionData> GetAssertionData(); - public virtual .<.> GetAssertions() { } - public abstract . GetAwaiter(); - public virtual .? GetLastAssertion() { } - public abstract . ProcessAssertionsAsync(.AssertionData data); [.DebuggerHidden] [("This is a base `object` method that should not be called.", true)] public void ReferenceEquals(object a, object b) { } - public virtual void SetBecause(string reason, string? expression) { } - public virtual void WithAssertion(. assertion) { } - } - public class AssertionBuilder - { - public AssertionBuilder(<.> asyncValueProvider, string? expression = null) { } - public AssertionBuilder( valueProvider, string? expression = null) { } - public AssertionBuilder(. task, string? expression = null) { } - public AssertionBuilder(. valueTask, string? expression = null) { } - public AssertionBuilder(TActual value, string? expression = null) { } - public . And { get; } - public . AssertHasSingleItem() { } - public . Contains( predicate) { } - public . Contains(object? item) { } - public .<., TItem> Contains( predicate) { } - public . DoesNotContain(object? item) { } - public . DoesNotContain( predicate) { } - public . EqualTo(TActual expected) { } - public . GetAwaiter() { } - public . GreaterThanOrEqualTo(TActual value) { } - public . HasCount() { } - public . HasCount(int expectedCount) { } - public . HasDistinctItems() { } - public . IsAssignableTo( expectedType) { } - public . IsAssignableTo() { } - public . IsEmpty() { } - public . IsEqualTo(TActual expected) { } - public . IsEqualTo(object? expected) { } - public . IsEqualTo(TActual expected, . comparer) { } - public . IsEqualTo(TActual expected, string because) { } - public . IsEquatableOrEqualTo(TActual expected) { } - public . IsEquivalentTo(. expected) { } - public . IsEquivalentTo(TActual expected) { } - public . IsEquivalentTo(object? expected) { } - public . IsEquivalentTo(. expected, . comparer) { } - public . IsEquivalentTo(. expected, . ordering) { } - public . IsFalse() { } - public . IsGreaterThan(TActual value) { } - public . IsGreaterThanOrEqualTo(TActual value) { } - public . IsIn(. values) { } - public . IsIn(params TActual[] values) { } - public . IsLessThan(TActual value) { } - public . IsLessThanOrEqualTo(TActual value) { } - public . IsNegative() { } - public . IsNotAssignableTo( expectedType) { } - public . IsNotAssignableTo() { } - public . IsNotEmpty() { } - public . IsNotEqualTo(TActual expected) { } - public . IsNotEquivalentTo(TActual expected) { } - public . IsNotEquivalentTo(object? expected) { } - public . IsNotEquivalentTo(. expected, . ordering) { } - public . IsNotIn(params TActual[] values) { } - public . IsNotNull() { } - public . IsNull() { } - public . IsPositive() { } - public . IsTrue() { } - public . IsTypeOf( expectedType) { } - public . IsTypeOf() - where TExpected : class { } - public . Satisfies( predicate, string? failureMessage = null) { } - public . Satisfies(> propertySelector, <., .> assertionBuilder) { } - public . Satisfies( converter, <., .> assertionBuilder) { } - public . Satisfies( propertySelector, <., .> assertionBuilder) { } - public . Throws( exceptionType) { } - public . Throws() - where TException : { } - public . ThrowsExactly() - where TException : { } - public . ThrowsException() { } - public . ThrowsException() - where TException : { } - public . ThrowsNothing() { } - public . ThrowsNothing() { } } - public class AssertionChainBuilder : . + public class AsyncDelegateAssertionBuilder : ., ..IDelegateSource, ..ISource { } + public class AsyncValueDelegateAssertionBuilder : ., ..IDelegateSource, ..ISource, ..IValueDelegateSource, ..IValueSource { } + public class CastableResultAssertionBuilder : . { } + public class CastedAssertionBuilder : . { } + public class ConvertedDelegateAssertionBuilder : . + where TException : { - public new . Contains(object? item) { } - public new . HasCount(int expectedCount) { } - public new . IsEmpty() { } - public new . IsEqualTo(T expected) { } - public new . IsFalse() { } - public new . IsNotEmpty() { } - public new . IsNotEqualTo(T expected) { } - public new . IsNotNull() { } - public new . IsNull() { } - public new . IsTrue() { } - public new . Satisfies( predicate, string? failureMessage = null) { } + public ConvertedDelegateAssertionBuilder(..IDelegateSource source) { } } - public class AssertionEvaluator + public class ConvertedValueAssertionBuilder : . { - public AssertionEvaluator() { } - public . EvaluateAsync(..IAssertionChain chain) { } - public .<.AssertionData> EvaluateAsync(.<.AssertionData> assertionDataTask, .<.> assertions, . expressionFormatter) { } - public .<.> GetResults() { } + public ConvertedValueAssertionBuilder(..IValueSource source, . convertToAssertCondition) { } } - public static class BetweenAssertionExtensions + public class DelegateAssertionBuilder : ., ..IDelegateSource, ..ISource { } + public interface IAndAssertionBuilder { } + public interface IInvokableAssertionBuilder : ..ISource { - public static . IsBetween(this . builder, TActual min, TActual max, bool inclusive = true) - where TActual : { } - public static . IsNotBetween(this . builder, TActual min, TActual max, bool inclusive = true) - where TActual : { } + . GetAwaiter(); + string? GetExpression(); } - public class BetweenAssertion : . - where TActual : + public interface IOrAssertionBuilder { } + public class InvokableAssertionBuilder : ., ..ISource, . { - public BetweenAssertion(<.> actualValueProvider, TActual min, TActual max, bool inclusive = true, bool shouldBeInRange = true) { } - public BetweenAssertion( actualValueProvider, TActual min, TActual max, bool inclusive = true, bool shouldBeInRange = true) { } - public BetweenAssertion(TActual actualValue, TActual min, TActual max, bool inclusive = true, bool shouldBeInRange = true) { } - protected override .<.> AssertAsync() { } - } - public class BooleanAssertion : . - { - public BooleanAssertion(<.> actualValueProvider, bool expectedValue) { } - public BooleanAssertion( actualValueProvider, bool expectedValue) { } - public BooleanAssertion(bool actualValue, bool expectedValue) { } - protected override .<.> AssertAsync() { } - } - public class ChainedAssertion : . - { - public ChainedAssertion(. baseAssertion) { } - protected override .<.> AssertAsync() { } - } - public static class ChainingExtensions - { - public static . Chain(this . builder, . other) { } - public static . Chain(this . builder, . other) { } - public static . CompletesWithin(this . builder, timeout) { } - public static . HasMember(this . builder, string memberName) { } - public static . HasMember(this . builder, propertySelector) { } - public static . HasMessageContaining(this . builder, string substring) - where T : { } - public static . HasMessageEndingWith(this . builder, string suffix) - where T : { } - public static . HasMessageEqualTo(this . builder, string expectedMessage) - where T : { } - public static . HasMessageStartingWith(this . builder, string prefix) - where T : { } - public static . IgnoringMember(this . assertion, string memberName) { } - public static . IgnoringWhitespace(this . assertion) { } - public static . IgnoringWhitespace(this . assertion) { } - public static .<> IsAssignableTo(this . assertion, targetType) { } - public static . IsAssignableTo(this . assertion, targetType) - where TException : { } - public static . IsAssignableTo(this . builder) { } - public static . IsAssignableTo(this . assertion) { } - public static . IsDefault(this . builder) { } - public static . IsNotDefault(this . builder) { } - public static . WithNullAndEmptyEquality(this . assertion) { } - public static . WithTrimming(this . assertion) { } - public static . WithTrimming(this . assertion) { } - public static .<> Within(this .<> assertion, tolerance) { } - public static .<> Within(this .<> assertion, tolerance) { } - public static .<> Within(this .<> assertion, tolerance) { } - } - public class CollectionAllAssertion : .<.> - { - public CollectionAllAssertion(<.> actualValueProvider) { } - public CollectionAllAssertion(<.<.>> actualValueProvider) { } - protected override .<.> AssertAsync() { } - public .<.> Satisfy( predicate) { } - public . Satisfy(<., .> assertionBuilder) { } - public . Satisfy(> asyncPropertySelector, <., .> assertionBuilder) { } - public . Satisfy( propertySelector, <., .> assertionBuilder) { } - } - public static class CollectionAllExtensions - { - public static . All(this .<.> builder) { } - public static . All(this .<.> builder) { } - public static . All(this . builder) { } - } - public enum CollectionAssertType - { - Empty = 0, - NotEmpty = 1, - Count = 2, - Contains = 3, - DoesNotContain = 4, - HasSingleItem = 5, - HasDistinctItems = 6, - } - public class CollectionAssertionBuilder : . - where TCollection : . - { - public CollectionAssertionBuilder(<.> asyncValueProvider, string? expression = null) { } - public CollectionAssertionBuilder( valueProvider, string? expression = null) { } - public CollectionAssertionBuilder(. task, string? expression = null) { } - public CollectionAssertionBuilder(. valueTask, string? expression = null) { } - public CollectionAssertionBuilder(TCollection value, string? expression = null) { } - public . All() { } - public . All( predicate) { } - public . Any( predicate) { } - public . Contains( predicate) { } - public . Contains(TElement item) { } - public . ContainsOnly( predicate) { } - public . DoesNotContain( predicate) { } - public . DoesNotContain(TElement item) { } - [("This is a base `object` method that should not be called.", true)] - public new void Equals(object? obj) { } - public new . GetAwaiter() { } - public . GetSingleItem() { } - public . HasCount() { } - public . HasCount(int expectedCount) { } - public . HasDistinctItems() { } - public . HasSingleItem() { } - public . IsEmpty() { } - public . IsEquivalentTo(. expected) { } - public . IsInDescendingOrder() { } - public . IsInOrder() { } - public . IsNotEmpty() { } - public . None( predicate) { } - [("This is a base `object` method that should not be called.", true)] - public new void ReferenceEquals(object a, object b) { } - } - public static class CollectionAssertionExtensions - { - public static . Contains(this . assertion, predicate) { } - public static . HasCount(this . assertion) { } - public static . HasCount(this . assertion, int expectedCount) { } - } - public class CollectionAssertion : . - { - public CollectionAssertion(<.> actualValueProvider, . assertType, int? expectedCount = default, object? expectedItem = null) { } - public CollectionAssertion( actualValueProvider, . assertType, int? expectedCount = default, object? expectedItem = null) { } - public CollectionAssertion(TActual actualValue, . assertType, int? expectedCount = default, object? expectedItem = null) { } - protected override .<.> AssertAsync() { } - } - public static class CollectionContainsOnlyExtensions - { - public static .<.> ContainsOnly(this .<.> builder, predicate) { } - public static .<.> ContainsOnly(this .<.> builder, params T[] expected) { } - public static .<.> ContainsOnly(this .<.> builder, predicate) { } - public static .<.> ContainsOnly(this .<.> builder, params T[] expected) { } - public static .<.> ContainsOnly(this .<.> builder, predicate) { } - public static .<.> ContainsOnly(this .<.> builder, predicate) { } - public static .<.> ContainsOnly(this .<.> builder, params T[] expected) { } - public static . ContainsOnly(this . builder, predicate) { } - public static . ContainsOnly(this . builder, params T[] expected) { } - public static .<.> DoesNotContain(this .<.> builder, predicate) { } - public static .<.> DoesNotContain(this .<.> builder, predicate) { } - public static . DoesNotContain(this . builder, predicate) { } - } - public static class CollectionExtensions - { - public static . GetSingleItem(this .<.> builder) { } - public static . GetSingleItem(this .<.> builder) { } - public static . GetSingleItem(this .<.> builder) { } - public static . GetSingleItem(this .<.> builder) { } - public static . GetSingleItem(this .<.> builder) { } - public static . GetSingleItem(this .<.> builder) { } - public static . GetSingleItem(this . builder) { } - public static . HasSingleItem(this . builder) - where T : .IEnumerable { } - } - public static class CollectionOrderingExtensions - { - public static .<.> IsInDescendingOrder(this .<.> builder) - where T : { } - public static . IsInDescendingOrder(this . builder) - where T : { } - public static .<.> IsInOrder(this .<.> builder) { } - public static .<.> IsInOrder(this .<.> builder) - where T : { } - public static . IsInOrder(this . builder) - where T : { } - } - public class ComparisonAndChain - { - public ComparisonAndChain(. previousAssertion, <.> valueProvider) { } - public . IsGreaterThan(TActual value) { } - public . IsGreaterThanOrEqualTo(TActual value) { } - public . IsLessThan(TActual value) { } - public . IsLessThanOrEqualTo(TActual value) { } - } - public class ComparisonAssertion : . - { - public ComparisonAssertion(<.> actualValueProvider, TActual comparisonValue, . comparisonType) { } - public ComparisonAssertion( actualValueProvider, TActual comparisonValue, . comparisonType) { } - public ComparisonAssertion(TActual actualValue, TActual comparisonValue, . comparisonType) { } - protected override .<.> AssertAsync() { } - } - public enum ComparisonType - { - GreaterThan = 0, - GreaterThanOrEqual = 1, - LessThan = 2, - LessThanOrEqual = 3, - } - public class ContainsPredicateAssertion : . - where TCollection : . - { - public ContainsPredicateAssertion(<.> collectionProvider, predicate) { } - protected override .<.> AssertAsync() { } - public new . GetAwaiter() { } + protected readonly ..ISource Source; + protected .<.> Assertions { get; } + public .<.<.>> GetAssertionResults() { } + public . GetAwaiter() { } } - public static class CultureInfoAssertionExtensions + public class InvokableDelegateAssertionBuilder : ., ..IDelegateSource, ..ISource { - public static .<.CultureInfo> IsEnglish(this .<.CultureInfo> builder) { } - public static .<.CultureInfo> IsInvariant(this .<.CultureInfo> builder) { } - public static .<.CultureInfo> IsLeftToRight(this .<.CultureInfo> builder) { } - public static .<.CultureInfo> IsNeutralCulture(this .<.CultureInfo> builder) { } - public static .<.CultureInfo> IsNotEnglish(this .<.CultureInfo> builder) { } - public static .<.CultureInfo> IsNotInvariant(this .<.CultureInfo> builder) { } - public static .<.CultureInfo> IsNotNeutralCulture(this .<.CultureInfo> builder) { } - public static .<.CultureInfo> IsReadOnly(this .<.CultureInfo> builder) { } - public static .<.CultureInfo> IsRightToLeft(this .<.CultureInfo> builder) { } - } - public class CustomAssertion : . - { - public CustomAssertion(<.> actualValueProvider, predicate, string? failureMessage) { } - public CustomAssertion( actualValueProvider, predicate, string? failureMessage) { } - public CustomAssertion(TActual actualValue, predicate, string? failureMessage) { } - protected override .<.> AssertAsync() { } - public . IgnoringType() { } - public . WithPartialEquivalency() { } - } - public class DateTimeAssertion : .<> - { - public DateTimeAssertion( actualValue, expected) { } - public DateTimeAssertion(<> actualValueProvider, expected) { } - public DateTimeAssertion(<.<>> actualValueProvider, expected) { } - protected override .<.> AssertAsync() { } - public .<> IsAfterOrEqualTo( other) { } - public .<> IsBeforeOrEqualTo( other) { } - public . Within( tolerance) { } - } - public static class DateTimeAssertionBuilderExtensions - { - public static .<> IsAfterOrEqualTo(this .<> builder, other) { } - public static .<> IsBeforeOrEqualTo(this .<> builder, other) { } - public static . IsEqualTo(this .<> builder, expected) { } - public static . IsEqualTo(this .<> builder, expected) { } - public static . IsEqualTo(this .<> builder, expected) { } - } - public class DateTimeOffsetAssertion : .<> - { - public DateTimeOffsetAssertion( actualValue, expected) { } - public DateTimeOffsetAssertion(<> actualValueProvider, expected) { } - public DateTimeOffsetAssertion(<.<>> actualValueProvider, expected) { } - protected override .<.> AssertAsync() { } - public . Within( tolerance) { } + public ..DelegateAnd And { get; } + public . AssertionBuilder { get; } + public ..DelegateOr Or { get; } } - public static class DayOfWeekAssertionExtensions + public class InvokableValueAssertionBuilder : ., ..ISource, ..IValueSource { - public static .<> IsFriday(this .<> builder) { } - public static .<> IsMonday(this .<> builder) { } - public static .<> IsSaturday(this .<> builder) { } - public static .<> IsSunday(this .<> builder) { } - public static .<> IsThursday(this .<> builder) { } - public static .<> IsTuesday(this .<> builder) { } - public static .<> IsWednesday(this .<> builder) { } - public static .<> IsWeekday(this .<> builder) { } - public static .<> IsWeekend(this .<> builder) { } - } - public class DelegateAssertionBuilder : . - where TDelegate : - { - protected readonly <.> _delegateProvider; - protected readonly string? _expression; - public DelegateAssertionBuilder(<.> asyncDelegateProvider, string? expression = null) { } - public DelegateAssertionBuilder( delegateProvider, string? expression = null) { } - public DelegateAssertionBuilder(. task, string? expression = null) { } - public DelegateAssertionBuilder(. valueTask, string? expression = null) { } - public DelegateAssertionBuilder(TDelegate delegateValue, string? expression = null) { } - public . And { get; } - [("This is a base `object` method that should not be called.", true)] - public new void Equals(object? obj) { } - public override .<.AssertionData> GetAssertionData() { } - public override . GetAwaiter() { } - public override . ProcessAssertionsAsync(.AssertionData data) { } - [("This is a base `object` method that should not be called.", true)] - public new void ReferenceEquals(object a, object b) { } - public . Throws( exceptionType) { } - public . Throws() - where TException : { } - public . ThrowsExactly() - where TException : { } - public . ThrowsException() { } - public . ThrowsException() - where TException : { } - public . ThrowsNothing() { } - } - public static class DictionaryAssertionExtensions - { - public static . ContainsKey(this . builder, object key) - where T : .IDictionary { } - public static . ContainsKey(this . builder, string key) - where T : . { } - public static .<.> ContainsKey(this .<.> builder, string key, . comparer) { } - public static . ContainsKey(this .<.> builder, TKey key) - where TKey : notnull { } - public static . ContainsKey(this .<.> builder, TKey key) { } - public static .<.> ContainsKey(this .<.> builder, TKey key) { } - public static . DoesNotContainKey(this .<.> builder, TKey key) - where TKey : notnull { } - public static . DoesNotContainKey(this .<.> builder, TKey key) { } - public static .<.> DoesNotContainKey(this .<.> builder, TKey key) { } - } - public class DictionaryAssertion : .<.> - { - public DictionaryAssertion(. actualValue, TKey? key, bool shouldContain) { } - public DictionaryAssertion(<.> actualValueProvider, TKey? key, bool shouldContain) { } - public DictionaryAssertion(<.<.>> actualValueProvider, TKey? key, bool shouldContain) { } - protected override .<.> AssertAsync() { } + public InvokableValueAssertionBuilder(..ISource source) { } + public ..ValueAnd And { get; } + public ..ValueOr Or { get; } + public . Because(string reason) { } + public new . GetAwaiter() { } } - public static class DirectoryInfoAssertionExtensions + public class InvokableValueDelegateAssertionBuilder : . { - public static .<.DirectoryInfo> DoesNotExist(this .<.DirectoryInfo> builder) { } - public static .<.DirectoryInfo> Exists(this .<.DirectoryInfo> builder) { } - public static .<.DirectoryInfo> HasFiles(this .<.DirectoryInfo> builder) { } - public static .<.DirectoryInfo> HasNoFiles(this .<.DirectoryInfo> builder) { } - public static .<.DirectoryInfo> HasNoSubdirectories(this .<.DirectoryInfo> builder) { } - public static .<.DirectoryInfo> HasSubdirectories(this .<.DirectoryInfo> builder) { } - public static .<.DirectoryInfo> IsEmpty(this .<.DirectoryInfo> builder) { } - public static .<.DirectoryInfo> IsNotEmpty(this .<.DirectoryInfo> builder) { } - } - public class DualAssertionBuilder : . - { - public DualAssertionBuilder(<.> asyncFuncValue, string? expression = null) { } - public DualAssertionBuilder( funcValue, string? expression = null) { } - public DualAssertionBuilder(. task, string? expression = null) { } - public DualAssertionBuilder(. valueTask, string? expression = null) { } - [("This is a base `object` method that should not be called.", true)] - public new void Equals(object? obj) { } - public new . GetAwaiter() { } - [("This is a base `object` method that should not be called.", true)] - public new void ReferenceEquals(object a, object b) { } - public . Throws( exceptionType) { } - public . Throws() - where TException : { } - public . ThrowsExactly() - where TException : { } - public . ThrowsException() { } - public . ThrowsException() - where TException : { } - public . ThrowsNothing() { } + public ..ValueDelegateAnd And { get; } + public . AssertionBuilder { get; } + public ..ValueDelegateOr Or { get; } } - public class DualCollectionAssertionBuilder : . - where TCollection : . + public class MappableResultAssertionBuilder : . { - public DualCollectionAssertionBuilder(<.> asyncFuncValue, string? expression = null) { } - public DualCollectionAssertionBuilder( funcValue, string? expression = null) { } - public DualCollectionAssertionBuilder(. task, string? expression = null) { } - public DualCollectionAssertionBuilder(. valueTask, string? expression = null) { } - [("This is a base `object` method that should not be called.", true)] - public new void Equals(object? obj) { } - public new . GetAwaiter() { } - [("This is a base `object` method that should not be called.", true)] - public new void ReferenceEquals(object a, object b) { } - public . Throws( exceptionType) { } - public . Throws() - where TException : { } - public . ThrowsExactly() - where TException : { } - public . ThrowsException() { } - public . ThrowsException() - where TException : { } - public . ThrowsNothing() { } + public MappableResultAssertionBuilder(. assertionBuilder, mapper) { } + public new . GetAwaiter() { } } - public static class EncodingAssertionExtensions + public class MappableResultAssertionBuilder : . + where TAssertCondition : . { - public static .<.Encoding> IsASCII(this .<.Encoding> builder) { } - public static .<.Encoding> IsBigEndianUnicode(this .<.Encoding> builder) { } - public static .<.Encoding> IsNotSingleByte(this .<.Encoding> builder) { } - public static .<.Encoding> IsNotUTF8(this .<.Encoding> builder) { } - public static .<.Encoding> IsSingleByte(this .<.Encoding> builder) { } - public static .<.Encoding> IsUTF32(this .<.Encoding> builder) { } - public static .<.Encoding> IsUTF8(this .<.Encoding> builder) { } - public static .<.Encoding> IsUnicode(this .<.Encoding> builder) { } + public MappableResultAssertionBuilder(. assertionBuilder, TAssertCondition assertCondition, mapper) { } + public new . GetAwaiter() { } } - public class ExceptionAssertion : .<> + public class OrAssertionBuilder : ., . { } + public class ValueAssertionBuilder : ., ..ISource, ..IValueSource { - public ExceptionAssertion( syncDelegate) { } - public ExceptionAssertion(<.> asyncDelegate) { } - public ExceptionAssertion( syncDelegate, expectedType) { } - public ExceptionAssertion(<.> asyncDelegate, expectedType) { } - public new . WithInnerException() { } + public ValueAssertionBuilder(..ISource source) { } } - public static class ExceptionAssertionExtensions + public class ValueDelegateAssertionBuilder : ., ..IDelegateSource, ..ISource, ..IValueDelegateSource, ..IValueSource { } +} +namespace . +{ + public class AndAssertionGroupInvoker + where TAssertionBuilder : . { - public static .<> HasInnerException(this .<> builder) { } - public static .<> HasNoData(this .<> builder) { } - public static .<> HasNoInnerException(this .<> builder) { } - public static .<> HasStackTrace(this .<> builder) { } + public AndAssertionGroupInvoker(..AssertionGroup group1, ..AssertionGroup group2) { } + public ..AndAssertionGroupInvoker And(..AssertionGroup group) { } + public . GetAwaiter() { } } - public class ExceptionAssertion : . - where TException : + public class AndAssertionGroup : ..AssertionGroup + where TAssertionBuilder : . { - public ExceptionAssertion( syncDelegate) { } - public ExceptionAssertion(<.> asyncDelegate) { } - public ExceptionAssertion( syncDelegate, expectedType) { } - public ExceptionAssertion(<.> asyncDelegate, expectedType) { } - public new . And { get; } - protected override .<.> AssertAsync() { } - public new . GetAwaiter() { } - public . GetExceptionAsync() { } - public . HasInnerException() { } - public . HasMessageContaining(string substring) { } - public . HasMessageEqualTo(string expectedMessage) { } - public . HasNoInnerException() { } - public . HasStackTrace() { } - public . IsAssignableTo( targetType) { } - public . IsAssignableTo() { } - public . Matching( predicate) { } - public . WithInnerException() { } - public . WithInnerException() - where TInner : { } - public . WithMessage(string expectedMessage) { } - public . WithMessageContaining(string substring) { } - public . WithMessageContaining(string substring, comparison) { } - public . WithMessageMatching(. matcher) { } - public . WithMessageMatching(string pattern) { } - public . WithMessageNotContaining(string substring) { } - public . WithMessageNotContaining(string substring, comparison) { } - public . WithParameterName(string parameterName) { } - public static . op_Implicit(. assertion) { } - } - public class ExecutionTimeAssertion : . - { - public ExecutionTimeAssertion(<.> actualValueProvider, timeout) { } - protected override .<.> AssertAsync() { } - } - public class ExpressionFormatter - { - public ExpressionFormatter(string? actualExpression) { } - public string? ActualExpression { get; } - public void AppendConnector(string connector) { } - public void AppendMethod(string methodName, params string?[] arguments) { } - public string GetExpression() { } + public ..AndAssertionGroup And(> assert) { } + public override . GetAwaiter() { } } - public static class FileInfoAssertionExtensions + public static class AssertionGroup { - public static .<.FileInfo> DoesNotExist(this .<.FileInfo> builder) { } - public static .<.FileInfo> Exists(this .<.FileInfo> builder) { } - public static .<.FileInfo> IsEmpty(this .<.FileInfo> builder) { } - public static .<.FileInfo> IsExecutable(this .<.FileInfo> builder) { } - public static .<.FileInfo> IsHidden(this .<.FileInfo> builder) { } - public static .<.FileInfo> IsNotEmpty(this .<.FileInfo> builder) { } - public static .<.FileInfo> IsNotExecutable(this .<.FileInfo> builder) { } - public static .<.FileInfo> IsNotHidden(this .<.FileInfo> builder) { } - public static .<.FileInfo> IsNotReadOnly(this .<.FileInfo> builder) { } - public static .<.FileInfo> IsNotSystem(this .<.FileInfo> builder) { } - public static .<.FileInfo> IsReadOnly(this .<.FileInfo> builder) { } - public static .<.FileInfo> IsSystem(this .<.FileInfo> builder) { } - } - public enum FileSystemAssertType - { - FileExists = 0, - FileDoesNotExist = 1, - DirectoryExists = 2, - DirectoryDoesNotExist = 3, - HasFiles = 4, - HasNoFiles = 5, - HasSubdirectories = 6, - HasNoSubdirectories = 7, - } - public class FileSystemAssertion : . - { - public FileSystemAssertion(<.> pathProvider, . assertType) { } - public FileSystemAssertion( pathProvider, . assertType) { } - public FileSystemAssertion(string path, . assertType) { } - protected override .<.> AssertAsync() { } + public static ..AndAssertionGroupInvoker And(..AssertionGroup group1, ..AssertionGroup group2) + where TAssertionBuilder : . { } + public static ..UnknownAssertionGroupInvoker Assert(..AssertionGroup group) + where TAssertionBuilder : . { } + public static ..AssertionGroupBuilder For( value) { } + public static ..AssertionGroupBuilder For(<.> value) { } + public static ..AssertionGroupBuilder For(. value) { } + public static ..AssertionGroupBuilder For(. value) { } + public static ..AssertionGroupBuilder> For(<.> value) { } + public static ..AssertionGroupBuilder> For( value) { } + public static ..AssertionGroupBuilder> For(. value) { } + public static ..AssertionGroupBuilder> For(. value) { } + public static ..AssertionGroupBuilder> For(TActual value) { } + public static ..AssertionGroupBuilder ForSameValueAs(..AssertionGroup otherGroup) { } + public static ..AssertionGroupBuilder ForSameValueAs(..AssertionGroup otherGroup) { } + public static ..AssertionGroupBuilder> ForSameValueAs(..AssertionGroup> otherGroup) { } + public static ..AssertionGroupBuilder> ForSameValueAs(..AssertionGroup> otherGroup) { } + public static ..AssertionGroupBuilder> ForSameValueAs(..AssertionGroup> otherGroup) { } + public static ..OrAssertionGroupInvoker Or(..AssertionGroup group1, ..AssertionGroup group2) + where TAssertionBuilder : . { } } - public static class FileSystemAssertionExtensions + public class AssertionGroupBuilder + where TAssertionBuilder : . { - public static . DirectoryDoesNotExist(this . builder) { } - public static . DirectoryExists(this . builder) { } - public static . DoesNotExist(this . builder) { } - public static . Exists(this . builder) { } - public static . HasFiles(this . builder) { } - public static . HasNoFiles(this . builder) { } - public static . HasNoSubdirectories(this . builder) { } - public static . HasSubdirectories(this . builder) { } + public ..UnknownAssertionGroup WithAssertion(> assert) { } } - public class GenericEqualToAssertion : . + public abstract class AssertionGroup + where TAssertionBuilder : . { - public GenericEqualToAssertion(<.> actualValueProvider, TActual expected) { } - public GenericEqualToAssertion( actualValueProvider, TActual expected) { } - public GenericEqualToAssertion(TActual actualValue, TActual expected) { } - protected override .<.> AssertAsync() { } - public . WithComparer(. comparer) { } - public . WithComparison( comparison) { } + public abstract . GetAwaiter(); } - public class GenericNotEqualToAssertion : . + public class OrAssertionException : { - public GenericNotEqualToAssertion(<.> actualValueProvider, TActual expected) { } - public GenericNotEqualToAssertion( actualValueProvider, TActual expected) { } - public GenericNotEqualToAssertion(TActual actualValue, TActual expected) { } - protected override .<.> AssertAsync() { } - public . WithComparer(. comparer) { } + public OrAssertionException(.<> exceptions) { } + public override string Message { get; } } - public static class HttpStatusCodeAssertionExtensions + public class OrAssertionGroupInvoker + where TAssertionBuilder : . { - public static .<.HttpStatusCode> IsClientError(this .<.HttpStatusCode> builder) { } - public static .<.HttpStatusCode> IsError(this .<.HttpStatusCode> builder) { } - public static .<.HttpStatusCode> IsInformational(this .<.HttpStatusCode> builder) { } - public static .<.HttpStatusCode> IsNotSuccess(this .<.HttpStatusCode> builder) { } - public static .<.HttpStatusCode> IsRedirection(this .<.HttpStatusCode> builder) { } - public static .<.HttpStatusCode> IsServerError(this .<.HttpStatusCode> builder) { } - public static .<.HttpStatusCode> IsSuccess(this .<.HttpStatusCode> builder) { } + public OrAssertionGroupInvoker(..AssertionGroup group1, ..AssertionGroup group2) { } + public . GetAwaiter() { } + public ..OrAssertionGroupInvoker Or(..AssertionGroup group) { } } - public interface IInvokableAssertionBuilder + public class OrAssertionGroup : ..AssertionGroup + where TAssertionBuilder : . { - .<.AssertionData> GetAssertionData(); - .<.> GetAssertions(); - . GetAwaiter(); - .? GetLastAssertion(); - . ProcessAssertionsAsync(.AssertionData data); + public override . GetAwaiter() { } + public ..OrAssertionGroup Or(> assert) { } } - public static class IgnoreType + public class UnknownAssertionGroupInvoker + where TAssertionBuilder : . { - public static . For(. assertion) { } + public UnknownAssertionGroupInvoker(..AssertionGroup group) { } + public ..AndAssertionGroupInvoker And(..AssertionGroup otherGroup) { } + public ..OrAssertionGroupInvoker Or(..AssertionGroup otherGroup) { } } - public static class IgnoringTypeGenericExtensions + public class UnknownAssertionGroup + where TAssertionBuilder : . { - public static . IgnoringType(this . assertion, typeToIgnore) { } + public ..AndAssertionGroup And(> assert) { } + public ..OrAssertionGroup Or(> assert) { } } - public class MemberAssertion : . +} +namespace . +{ + public class BetweenAssertionBuilderWrapper : . + where TActual : { - public MemberAssertion(<.> objectProvider, .<> memberSelector) { } - public . EqualTo(TMember expected) { } + public ..BetweenAssertionBuilderWrapper WithExclusiveBounds() { } + public ..BetweenAssertionBuilderWrapper WithInclusiveBounds() { } } - public class NullAssertion : . + public class DateTimeEqualToAssertionBuilderWrapper : .<> { - public NullAssertion(<.> actualValueProvider, bool shouldBeNull) { } - public NullAssertion( actualValueProvider, bool shouldBeNull) { } - public NullAssertion(TActual actualValue, bool shouldBeNull) { } - protected override .<.> AssertAsync() { } - public new . GetAwaiter() { } + public ..DateTimeEqualToAssertionBuilderWrapper Within( tolerance, [.("tolerance")] string doNotPopulateThis = "") { } } - public static class NullableStringAssertionBuilderExtensions - { - public static . DoesNotContain(this . builder, string substring) { } - public static . HasLength(this . builder, int expectedLength) { } - public static . IsEmpty(this . builder) { } - public static . IsNotEmpty(this . builder) { } - } - public static class NumericAssertionExtensions - { - public static . IsInfinity(this . builder) { } - public static . IsNaN(this . builder) { } - public static . IsNegative(this . builder) { } - public static . IsNegative(this . builder) { } - public static . IsNegative(this . builder) { } - public static . IsNegative(this . builder) { } - public static . IsNegative(this . builder) { } - public static . IsNegative(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsZero(this . builder) { } - public static . Negative(this . builder) { } - public static . Negative(this . builder) { } - public static . Negative(this . builder) { } - public static . Negative(this . builder) { } - public static . Negative(this . builder) { } - public static . Negative(this . builder) { } - public static . Positive(this . builder) { } - public static . Positive(this . builder) { } - public static . Positive(this . builder) { } - public static . Positive(this . builder) { } - public static . Positive(this . builder) { } - public static . Positive(this . builder) { } - public static . Positive(this . builder) { } - public static . Zero(this . builder) { } - } - public class NumericAssertion : . - where T : struct, - { - public NumericAssertion(<.> actualValueProvider) { } - public NumericAssertion( actualValueProvider) { } - protected override .<.> AssertAsync() { } - public . GreaterThan(T other) { } - public . GreaterThanOrEqualTo(T other) { } - public . LessThan(T other) { } - public . LessThanOrEqualTo(T other) { } - public . Negative() { } - public . NotZero() { } - public . Positive() { } - public . Zero() { } - } - public static class NumericRangeAssertionExtensions - { - public static . IsBetween(this . builder, decimal min, decimal max) { } - public static . IsBetween(this . builder, double min, double max) { } - public static . IsBetween(this . builder, int min, int max) { } - public static . IsBetween(this . builder, long min, long max) { } - public static . IsNotBetween(this . builder, decimal min, decimal max) { } - public static . IsNotBetween(this . builder, double min, double max) { } - public static . IsNotBetween(this . builder, int min, int max) { } - public static . IsNotBetween(this . builder, long min, long max) { } - } - public static class ObjectReferenceAssertionExtensions - { - public static . IsNotSameReferenceAs(this . builder, object? expected) { } - public static . IsSameReferenceAs(this . builder, object? expected) { } - } - public class ParseAssertion : . - { - public ParseAssertion(<.> actualValueProvider, bool shouldBeParsable) { } - public ParseAssertion( actualValueProvider, bool shouldBeParsable) { } - public ParseAssertion(string? actualValue, bool shouldBeParsable) { } - protected override .<.> AssertAsync() { } - public . WithFormatProvider( formatProvider) { } - } - public class PropertyMemberAssertion : . - { - public PropertyMemberAssertion(<.> actualValueProvider, propertySelector) { } - public PropertyMemberAssertion( actualValueProvider, propertySelector) { } - protected override .<.> AssertAsync() { } - public . EqualTo(TProperty expectedValue) { } - public . IsEqualTo(TProperty expectedValue) { } - } - public class PropertySatisfiesAllAssertion : .<.> - { - public PropertySatisfiesAllAssertion(<.<.>> actualValueProvider, propertySelector, <., .> assertionBuilder) { } - protected override .<.> AssertAsync() { } - } - public class PropertySatisfiesAllAsyncAssertion : .<.> - { - public PropertySatisfiesAllAsyncAssertion(<.<.>> actualValueProvider, > asyncPropertySelector, <., .> assertionBuilder) { } - protected override .<.> AssertAsync() { } - } - public class PropertySatisfiesAssertion : . - { - public PropertySatisfiesAssertion(<.> actualValueProvider, propertySelector, <., .> assertionBuilder) { } - public PropertySatisfiesAssertion( actualValueProvider, propertySelector, <., .> assertionBuilder) { } - protected override .<.> AssertAsync() { } - } - public class PropertySatisfiesAsyncAssertion : . - { - public PropertySatisfiesAsyncAssertion(<.> actualValueProvider, > asyncPropertySelector, <., .> assertionBuilder) { } - public PropertySatisfiesAsyncAssertion( actualValueProvider, > asyncPropertySelector, <., .> assertionBuilder) { } - protected override .<.> AssertAsync() { } - } - public static class RangeExtensions - { - public static . WithExclusiveBounds(this . assertion) - where TActual : { } - public static . WithExclusiveBounds(this . assertion) - where TActual : { } - public static . WithInclusiveBounds(this . assertion) - where TActual : { } - public static . WithInclusiveBounds(this . assertion) - where TActual : { } + public class DateTimeOffsetEqualToAssertionBuilderWrapper : .<> + { + public ..DateTimeOffsetEqualToAssertionBuilderWrapper Within( tolerance, [.("tolerance")] string doNotPopulateThis = "") { } } - public static class ReferenceAssertionBuilderExtensions + public class EquivalentToAssertionBuilderWrapper : . { - public static . IsNotSameReferenceAs(this . builder, TActual? expected) - where TActual : class { } - public static . IsSameReferenceAs(this . builder, TActual? expected) - where TActual : class { } + public ..EquivalentToAssertionBuilderWrapper IgnoringMember(string propertyName, [.("propertyName")] string doNotPopulateThis = "") { } + public ..EquivalentToAssertionBuilderWrapper IgnoringType( type, [.("type")] string doNotPopulateThis = "") { } + public ..EquivalentToAssertionBuilderWrapper IgnoringType() { } + public ..EquivalentToAssertionBuilderWrapper WithPartialEquivalency() { } + } + public class GenericEqualToAssertionBuilderWrapper : . { } + public class GenericNotEqualToAssertionBuilderWrapper : . { } + public class NotBetweenAssertionBuilderWrapper : . + where TActual : + { + public ..NotBetweenAssertionBuilderWrapper WithExclusiveBounds() { } + public ..NotBetweenAssertionBuilderWrapper WithInclusiveBounds() { } + } + public class NotEquivalentToAssertionBuilderWrapper : . + { + public ..NotEquivalentToAssertionBuilderWrapper IgnoringMember(string propertyName, [.("propertyName")] string doNotPopulateThis = "") { } + public ..NotEquivalentToAssertionBuilderWrapper IgnoringType( type, [.("type")] string doNotPopulateThis = "") { } + public ..NotEquivalentToAssertionBuilderWrapper IgnoringType() { } + public ..NotEquivalentToAssertionBuilderWrapper WithPartialEquivalency() { } } - public class ReferenceAssertion : . + public class NotNullAssertionBuilderWrapper : . where TActual : class { - public ReferenceAssertion(<.> actualValueProvider, TActual? expected, bool shouldBeSame) { } - public ReferenceAssertion( actualValueProvider, TActual? expected, bool shouldBeSame) { } - public ReferenceAssertion(TActual actualValue, TActual? expected, bool shouldBeSame) { } - protected override .<.> AssertAsync() { } - } - public class SingleItemAssertion : . - { - public SingleItemAssertion(<.<.IEnumerable>> collectionProvider) { } - } - public static class StringAssertionBuilderExtensions - { - public static . Contains(this . builder, string substring) { } - public static . DoesNotContain(this . builder, string substring) { } - public static . DoesNotExist(this . builder) { } - public static . DoesNotMatch(this . builder, . regex) { } - public static . DoesNotMatch(this . builder, string pattern) { } - public static . EndsWith(this . builder, string suffix) { } - public static . Exists(this . builder) { } - public static . HasCount(this . builder) { } - public static . HasFiles(this . builder) { } - public static . HasLength(this . builder) { } - public static . HasLength(this . builder, int expectedLength) { } - public static . HasNoSubdirectories(this . builder) { } - public static . IsDefault(this . builder) { } - public static . IsEmpty(this . builder) { } - public static . IsEqualTo(this . builder, string? expected) { } - public static . IsEqualTo(this . builder, string? expected, comparison) { } - public static . IsNotDefault(this . builder) { } - public static . IsNotEmpty(this . builder) { } - public static . IsNotNullOrEmpty(this . builder) { } - public static . IsNotParsableInto(this . builder) { } - public static . IsNullOrEmpty(this . builder) { } - public static . IsNullOrWhitespace(this . builder) { } - public static . IsParsableInto(this . builder) { } - public static . Matches(this . builder, . regex) { } - public static . Matches(this . builder, string pattern) { } - public static . StartsWith(this . builder, string prefix) { } - public static . WhenParsedInto(this . builder) { } + public new . GetAwaiter() { } } - public static class StringAssertionExtensions + public class NotNullStructAssertionBuilderWrapper : . + where TActual : struct { - public static . IsEqualToSimplified(this actualProvider, string? expected) { } - public static . IsEqualToSimplified(this . actualTask, string? expected) { } - public static . IsEqualToSimplified(this string? actual, string? expected) { } + public new . GetAwaiter() { } } - public static class StringBuilderAssertionExtensions + public class ParseAssertionBuilderWrapper : . { - public static .<.StringBuilder> HasExcessCapacity(this .<.StringBuilder> builder) { } - public static .<.StringBuilder> HasNoExcessCapacity(this .<.StringBuilder> builder) { } - public static .<.StringBuilder> IsEmpty(this .<.StringBuilder> builder) { } - public static .<.StringBuilder> IsNotEmpty(this .<.StringBuilder> builder) { } - } - public class StringContainsAssertion : . - { - public StringContainsAssertion(<.> actualValueProvider, string substring) { } - public StringContainsAssertion( actualValueProvider, string substring) { } - public StringContainsAssertion(string? actualValue, string substring) { } - protected override .<.> AssertAsync() { } - public . IgnoringCase() { } - public . IgnoringWhitespace() { } - public . WithComparison( comparison) { } - public . WithTrimming() { } - } - public class StringEndsWithAssertion : . - { - public StringEndsWithAssertion(<.> actualValueProvider, string suffix) { } - public StringEndsWithAssertion( actualValueProvider, string suffix) { } - public StringEndsWithAssertion(string? actualValue, string suffix) { } - protected override .<.> AssertAsync() { } - public . IgnoringCase() { } - public . WithComparison( comparison) { } - } - public class StringEqualToAssertion : . - { - public StringEqualToAssertion(<.> actualValueProvider, string? expected) { } - public StringEqualToAssertion( actualValueProvider, string? expected) { } - public StringEqualToAssertion(string? actualValue, string? expected) { } - protected override .<.> AssertAsync() { } - public . IgnoringCase() { } - public . IgnoringWhitespace() { } - public . WithNullAndEmptyEquality() { } - public . WithStringComparison( comparison) { } - public . WithTrimming() { } - } - public class StringStartsWithAssertion : . - { - public StringStartsWithAssertion(<.> actualValueProvider, string prefix) { } - public StringStartsWithAssertion( actualValueProvider, string prefix) { } - public StringStartsWithAssertion(string? actualValue, string prefix) { } - protected override .<.> AssertAsync() { } - public . IgnoringCase() { } - public . WithComparison( comparison) { } - } - public class ThrowsNothingAssertion : . - { - public ThrowsNothingAssertion(<.> actualValueProvider) { } - protected override .<.> AssertAsync() { } - public new . GetAwaiter() { } - public . GetValueAsync() { } - public static . op_Implicit(. assertion) { } - } - public class TimeSpanAssertion : .<> - { - public TimeSpanAssertion(<.<>> actualValueProvider, expected) { } - public TimeSpanAssertion(<> actualValueProvider, expected) { } - public TimeSpanAssertion( actualValue, expected) { } - protected override .<.> AssertAsync() { } - public . Within( tolerance) { } - } - public class TypeAssertion : . - { - public TypeAssertion(<.> actualValueProvider, expectedType, bool exact) { } - public TypeAssertion( actualValueProvider, expectedType, bool exact) { } - public TypeAssertion(TActual actualValue, expectedType, bool exact) { } - protected override .<.> AssertAsync() { } - } - public class TypeOfAssertion : . - where TExpected : class - { - public TypeOfAssertion(<.> actualValueProvider) { } - public TypeOfAssertion( actualValueProvider) { } - public new . And { get; } - protected override .<.> AssertAsync() { } - public new . GetAwaiter() { } - public . GetValueAsync() { } - public static . op_Implicit(. assertion) { } - } - public class ValueAssertionBuilder : . - { - protected readonly <.> _actualValueProvider; - protected readonly string? _expression; - public ValueAssertionBuilder(<.> asyncValueProvider, string? expression = null) { } - public ValueAssertionBuilder( valueProvider, string? expression = null) { } - public ValueAssertionBuilder(. task, string? expression = null) { } - public ValueAssertionBuilder(. valueTask, string? expression = null) { } - public ValueAssertionBuilder(TActual value, string? expression = null) { } - public . And { get; } - public . EqualTo(TActual expected) { } - [("This is a base `object` method that should not be called.", true)] - public new void Equals(object? obj) { } - public override .<.AssertionData> GetAssertionData() { } - public override . GetAwaiter() { } - public . GetTypedAwaiter() { } - public . IsAssignableTo( expectedType) { } - public . IsAssignableTo() { } - public . IsEqualTo(TActual expected) { } - public . IsEqualTo(object? expected) { } - public . IsEqualTo(TActual expected, . comparer) { } - public . IsEqualTo(TActual expected, string because) { } - public . IsEquatableOrEqualTo(TActual expected) { } - public . IsEquivalentTo(. expected) { } - public . IsEquivalentTo(. expected, . ordering) { } - public . IsEquivalentTo(object? expected, ? comparer = null) { } - public . IsEquivalentTo(. expected, . comparer) { } - public . IsEquivalentTo(. expected, . ordering) { } - public . IsIn(. values) { } - public . IsIn(params TActual[] values) { } - public . IsNotAssignableTo( expectedType) { } - public . IsNotAssignableTo() { } - public . IsNotEqualTo(TActual expected) { } - public . IsNotEqualTo(object? expected) { } - public . IsNotEquivalentTo(. expected) { } - public . IsNotEquivalentTo(. expected, . ordering) { } - public . IsNotEquivalentTo(object? expected, ? comparer = null) { } - public . IsNotEquivalentTo(. expected, . ordering) { } - public . IsNotIn(. values) { } - public . IsNotIn(params TActual[] values) { } - public . IsNotNull() { } - public . IsNotSameReferenceAs(TActual expected) { } - public . IsNotSameReferenceAs(object? expected) { } - public . IsNull() { } - public . IsSameReferenceAs(TActual expected) { } - public . IsSameReferenceAs(object? expected) { } - public . IsTypeOf( expectedType) { } - public . IsTypeOf() - where TExpected : class { } - public override . ProcessAssertionsAsync(.AssertionData data) { } - [("This is a base `object` method that should not be called.", true)] - public new void ReferenceEquals(object a, object b) { } - public . Satisfies( predicate, string? failureMessage = null) { } - public . Satisfies( converter, <., .> assertionBuilder) { } - public . Satisfies(.<>> asyncPropertySelector, <., .> assertionBuilder) { } - public . Satisfies(.<> propertySelector, <., .> assertionBuilder) { } + public . WithFormatProvider(? formatProvider) { } } - public static class WeakReferenceAssertionExtensions + public class SingleItemAssertionBuilderWrapper : . + where TActual : . { - public static .<> IsAlive(this .<> builder) { } - public static .<> IsDead(this .<> builder) { } + public new . GetAwaiter() { } } - public class WhenParsedAssertion : . + public class StringContainsAssertionBuilderWrapper : . { - public WhenParsedAssertion(<.> stringValueProvider, ? formatProvider = null) { } + public ..StringContainsAssertionBuilderWrapper IgnoringWhitespace() { } + public ..StringContainsAssertionBuilderWrapper WithTrimming() { } } -} -namespace . -{ - public class ChainedAssertion + public class StringEqualToAssertionBuilderWrapper : . { - public ChainedAssertion(. assertion, . chainType = 0) { } - public . Assertion { get; } - public . ChainType { get; } + public ..StringEqualToAssertionBuilderWrapper IgnoringWhitespace() { } + public ..StringEqualToAssertionBuilderWrapper WithNullAndEmptyEquality() { } + public ..StringEqualToAssertionBuilderWrapper WithTrimming() { } + } + public class TimeSpanEqualToAssertionBuilderWrapper : .<> + { + public ..TimeSpanEqualToAssertionBuilderWrapper Within( tolerance, [.("tolerance")] string doNotPopulateThis = "") { } } } namespace . { - public interface IAssertionChain + public class CompleteWithinAssertCondition : . + { + public CompleteWithinAssertCondition( timeSpan) { } + public override ? WaitFor { get; } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public static class DelegateExtensions { - void AddAndAssertion(. assertion); - void AddAssertion(. assertion, . chainType = 0); - void AddOrAssertion(. assertion); - .<..ChainedAssertion> GetAssertions(); - .<.> GetBaseAssertions(); - .? GetLastAssertion(); + public static . CompletesWithin(this ..IDelegateSource delegateSource, timeSpan, [.("timeSpan")] string? doNotPopulateThisValue = null) { } + public static . CompletesWithin(this ..IValueDelegateSource delegateSource, timeSpan, [.("timeSpan")] string? doNotPopulateThisValue = null) { } } } -namespace .Attributes +namespace ..Conditions { - [(.Method)] - public sealed class AssertionAttribute : + public class EnumDoesNotHaveFlagAssertCondition : . + where TEnum : { - public AssertionAttribute(string expectation, string? but = null) { } - public string? But { get; } - public string Expectation { get; } + public EnumDoesNotHaveFlagAssertCondition(TEnum expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TEnum? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } } - [(.Class, AllowMultiple=true)] - public class CreateAssertionAttribute : + public class EnumDoesNotHaveSameNameAsCondition : . + where TEnum : + where TExpected : { - public CreateAssertionAttribute( targetType, string methodName) { } - public CreateAssertionAttribute( targetType, containingType, string methodName) { } - public ? ContainingType { get; } - public string? CustomName { get; set; } - public string MethodName { get; } - public bool NegateLogic { get; set; } + public EnumDoesNotHaveSameNameAsCondition(TExpected expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TEnum? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EnumDoesNotHaveSameValueAsCondition : . + where TEnum : + where TExpected : + { + public EnumDoesNotHaveSameValueAsCondition(TExpected expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TEnum? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EnumHasFlagAssertCondition : . + where TEnum : + { + public EnumHasFlagAssertCondition(TEnum expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TEnum? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EnumHasSameNameAsCondition : . + where TEnum : + where TExpected : + { + public EnumHasSameNameAsCondition(TExpected expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TEnum? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EnumHasSameValueAsCondition : . + where TEnum : + where TExpected : + { + public EnumHasSameValueAsCondition(TExpected expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TEnum? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EnumIsDefinedAssertCondition : . + where TEnum : struct, + { + public EnumIsDefinedAssertCondition() { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TEnum actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EnumIsNotDefinedAssertCondition : . + where TEnum : struct, + { + public EnumIsNotDefinedAssertCondition() { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TEnum actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } +} +namespace . +{ + public static class EnumHasExtensions + { + public static . DoesNotHaveFlag(this ..IValueSource valueSource, TEnum expected, [.("expected")] string? doNotPopulateThisValue1 = null) + where TEnum : { } + public static . DoesNotHaveSameNameAs(this ..IValueSource valueSource, TExpected expected, [.("expected")] string? doNotPopulateThisValue1 = null) + where TEnum : + where TExpected : { } + public static . DoesNotHaveSameValueAs(this ..IValueSource valueSource, TExpected expected, [.("expected")] string? doNotPopulateThisValue1 = null) + where TEnum : + where TExpected : { } + public static . HasFlag(this ..IValueSource valueSource, TEnum expected, [.("expected")] string? doNotPopulateThisValue1 = null) + where TEnum : { } + public static . HasSameNameAs(this ..IValueSource valueSource, TExpected expected, [.("expected")] string? doNotPopulateThisValue1 = null) + where TEnum : + where TExpected : { } + public static . HasSameValueAs(this ..IValueSource valueSource, TExpected expected, [.("expected")] string? doNotPopulateThisValue1 = null) + where TEnum : + where TExpected : { } + } +} +namespace ..Conditions +{ + public class AssignableFromExpectedValueAssertCondition : . + { + public AssignableFromExpectedValueAssertCondition( expectedType) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class AssignableToExpectedValueAssertCondition : . + { + public AssignableToExpectedValueAssertCondition( expectedType) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ConvertExceptionToValueAssertCondition : . + where TException : + { + public ConvertExceptionToValueAssertCondition() { } + public TException ConvertedExceptionValue { get; } + protected override string GetExpectation() { } + protected override sealed .<.> GetResult(object? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DefaultExpectedValueAssertCondition : . + { + public DefaultExpectedValueAssertCondition() { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DelegateConversionAssertionCondition : . + where TToType : + { + public DelegateConversionAssertionCondition(..IDelegateSource source, . assertCondition) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TToType? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EqualsExpectedValueAssertCondition : . + { + public EqualsExpectedValueAssertCondition(TActual expected) { } + public EqualsExpectedValueAssertCondition(TActual expected, . equalityComparer) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, TActual? expectedValue) { } + } + public class EquivalentToExpectedValueAssertCondition : . + { + public EquivalentToExpectedValueAssertCondition(TExpected expected, string? expectedExpression) { } + public . EquivalencyKind { get; set; } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, TExpected? expectedValue) { } + public void IgnoringMember(string fieldName) { } + public void IgnoringType( type) { } + } + public class NotAssignableFromExpectedValueAssertCondition : . + { + public NotAssignableFromExpectedValueAssertCondition( expectedType) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class NotAssignableToExpectedValueAssertCondition : . + { + public NotAssignableToExpectedValueAssertCondition( expectedType) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class NotDefaultExpectedValueAssertCondition : . + { + public NotDefaultExpectedValueAssertCondition() { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, TActual? expectedValue) { } + } + public class NotEqualsExpectedValueAssertCondition : . + { + public NotEqualsExpectedValueAssertCondition(TActual expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, TActual? expectedValue) { } + } + public class NotEquivalentToExpectedValueAssertCondition : . + { + public NotEquivalentToExpectedValueAssertCondition(TExpected expected, string? expectedExpression) { } + public . EquivalencyKind { get; set; } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, TExpected? expectedValue) { } + public void IgnoringMember(string fieldName) { } + public void IgnoringType( type) { } + } + public class NotSameReferenceExpectedValueAssertCondition : . + { + public NotSameReferenceExpectedValueAssertCondition(TExpected expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, TExpected? expectedValue) { } + } + public class NotTypeOfExpectedValueAssertCondition : . + { + public NotTypeOfExpectedValueAssertCondition( expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class SameReferenceExpectedValueAssertCondition : . + { + public SameReferenceExpectedValueAssertCondition(TExpected expected) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, TExpected? expectedValue) { } + } + public class TypeOfExpectedValueAssertCondition : . + { + public TypeOfExpectedValueAssertCondition( expectedType) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TActual? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ValueConversionAssertionCondition : . + { + public ValueConversionAssertionCondition(..ISource source, . convertToAssertCondition) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(TToType? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } +} +namespace ..Conditions +{ + public class ParseConversionAssertCondition : . + { + public ParseConversionAssertCondition(? formatProvider = null) { } + public override .<<., TTarget?>> ConvertValue(string? value) { } + protected override string GetExpectation() { } + } + public class StringContainsExpectedValueAssertCondition : . + { + public StringContainsExpectedValueAssertCondition(string expected, stringComparison) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, string? expectedValue) { } + } + public class StringIsNotParsableCondition : . + { + public StringIsNotParsableCondition(? formatProvider = null) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, ? formatProvider) { } + } + public class StringIsParsableCondition : . + { + public StringIsParsableCondition(? formatProvider = null) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, ? formatProvider) { } + } +} +namespace . +{ + public static class StringParsingExtensions + { + public static ..ParseAssertionBuilderWrapper IsNotParsableInto(this ..IValueSource valueSource, [.("valueSource")] string? doNotPopulateThisValue = null) { } + public static ..ParseAssertionBuilderWrapper IsParsableInto(this ..IValueSource valueSource, [.("valueSource")] string? doNotPopulateThisValue = null) { } + public static . WhenParsedInto(this ..IValueSource valueSource, ? formatProvider = null, [.("valueSource")] string? doNotPopulateThisValue = null) { } + } +} +namespace .Attributes +{ + [(.Class, AllowMultiple=true)] + public class CreateAssertionAttribute : + { + public CreateAssertionAttribute( targetType, string methodName) { } + public CreateAssertionAttribute( targetType, containingType, string methodName) { } + public ? ContainingType { get; } + public string? CustomName { get; set; } + public string MethodName { get; } + public bool NegateLogic { get; set; } public bool RequiresGenericTypeParameter { get; set; } public TargetType { get; } public bool TreatAsInstance { get; set; } @@ -1449,336 +1206,1791 @@ namespace .Exceptions } namespace .Extensions { - public static class AssertionBuilderCollectionExtensions - { - public static . Contains(this . builder, TElement item) - where TCollection : . { } - public static .<.> ContainsOnly(this .<.> builder, predicate) { } - public static . ContainsOnly(this . builder, predicate) - where TCollection : . { } - public static .<.> DoesNotContain(this .<.> builder, predicate) { } - public static . DoesNotContain(this . builder, predicate) - where TCollection : . { } - public static . DoesNotContain(this . builder, TElement item) - where TCollection : . { } - public static . HasCount(this .<.> builder) { } - public static .<.> HasCount(this .<.> builder, int expectedCount) { } - public static . HasCount(this . builder, int expectedCount) - where TCollection : . { } - public static .<.> HasDistinctItems(this .<.> builder) { } - public static . HasDistinctItems(this . builder) - where TCollection : . { } - public static .<.> HasSingleItem(this .<.> builder) { } - public static . HasSingleItem(this . builder) - where TCollection : . { } - public static .<.> IsEmpty(this .<.> builder) { } - public static . IsEmpty(this . builder) - where TCollection : . { } - public static .<.> IsNotEmpty(this .<.> builder) { } - public static . IsNotEmpty(this . builder) - where TCollection : . { } - } - public static class BecauseExtensions - { - public static TAssertionBuilder Because(this TAssertionBuilder assertionBuilder, string reason, [.("reason")] string? reasonExpression = null) - where TAssertionBuilder : . { } + public class AggregateExceptionExceptionAssertionExtensionsHasMultipleInnerExceptionsWithAggregateExceptionAssertCondition : .<> + { + public AggregateExceptionExceptionAssertionExtensionsHasMultipleInnerExceptionsWithAggregateExceptionAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } } - public static class BooleanAssertionExtensions - { - public static . IsFalse(this . builder) { } - public static . IsFalse(this . builder) { } - public static . IsFalse(this . builder) { } - public static . IsFalse(this . builder) { } - public static . IsTrue(this . builder) { } - public static . IsTrue(this . builder) { } - public static . IsTrue(this . builder) { } - public static . IsTrue(this . builder) { } - } - public static class CollectionAssertionExtensions - { - public static . Contains(this . builder, TElement item) - where TCollection : . { } - public static . Contains(this . builder, TElement item) - where TCollection : . { } - public static .<.> ContainsOnly(this .<.> builder, predicate) { } - public static . DoesNotContain(this . builder, TElement item) - where TCollection : . { } - public static . DoesNotContain(this . builder, TElement item) - where TCollection : . { } - public static . HasCount(this . builder, int expectedCount) - where TCollection : .IEnumerable { } - public static .<.> HasSingleItem(this .<.> builder) { } - public static .<.> HasSingleItem(this .<.> builder) { } - public static . IsEmpty(this . builder) - where TCollection : .IEnumerable { } - public static . IsEmpty(this . builder) - where TCollection : .IEnumerable { } - public static . IsEquivalentTo(this . builder, . expected) - where TCollection : . - where TElement : notnull { } - public static . IsNotEmpty(this . builder) - where TCollection : .IEnumerable { } - public static . IsNotEmpty(this . builder) - where TCollection : .IEnumerable { } - public static . IsNotEquivalentTo(this . builder, . expected) - where TCollection : . - where TElement : notnull { } - } - public static class ComparableAssertionExtensions - { - public static . GreaterThanOrEqualTo(this . builder, T value) - where T : { } - public static . GreaterThanOrEqualTo(this . builder, T value) - where T : { } - public static . IsBetween(this . builder, T min, T max) - where T : { } - public static . IsBetween(this . builder, T min, T max) - where T : { } - public static . IsGreaterThan(this . builder, T value) - where T : { } - public static . IsGreaterThan(this . builder, T value) - where T : { } - public static . IsGreaterThanOrEqualTo(this . builder, T value) - where T : { } - public static . IsGreaterThanOrEqualTo(this . builder, T value) - where T : { } - public static . IsLessThan(this . builder, T value) - where T : { } - public static . IsLessThan(this . builder, T value) - where T : { } - public static . IsLessThanOrEqualTo(this . builder, T value) - where T : { } - public static . IsLessThanOrEqualTo(this . builder, T value) - where T : { } - } - public static class CustomAssertionExtensions - { - public static . RegisterAssertion(this ..IValueSource valueSource, . condition, string[]? expressions = null) { } - public static . RegisterAssertion(this . builder, . condition, string[]? expressions = null) { } - public static . RegisterConversionAssertion(this ..IValueSource valueSource, . condition, string[]? expressions = null) { } - public static . RegisterConversionAssertion(this . builder, . condition, string[]? expressions = null) { } - public static . RegisterConversionAssertion(this . builder, . condition, string[]? expressions = null) { } - } - public static class DelegateAssertionExtensions - { - public static .<> CompletesWithin(this .<> builder, timeout) { } - public static .<<.>> CompletesWithin(this .<<.>> builder, timeout) { } - public static . CompletesWithin(this . builder, timeout) { } - public static .<> DoesNotCompleteWithin(this .<> builder, timeout) { } - public static .<<.>> DoesNotCompleteWithin(this .<<.>> builder, timeout) { } - public static . DoesNotCompleteWithin(this . builder, timeout) { } - } - public static class DictionaryAssertionExtensions - { - public static . ContainsKey(this . builder, object key) - where TDictionary : class { } - public static .<.> ContainsKey(this .<.> builder, string key, . comparer) { } - public static .<.> ContainsKey(this .<.> builder, TKey key) - where TKey : notnull { } - public static .<.> ContainsKey(this .<.> builder, TKey key) - where TKey : notnull { } - public static .<.> ContainsKey(this .<.> builder, TKey key) - where TKey : notnull { } - public static .<.> ContainsKey(this .<.> builder, TKey key) - where TKey : notnull { } - public static .<.> ContainsValue(this .<.> builder, TValue value) - where TKey : notnull { } - public static . DoesNotContainKey(this . builder, object key) - where TDictionary : class { } - public static .<.> DoesNotContainKey(this .<.> builder, TKey key) - where TKey : notnull { } - public static .<.> DoesNotContainKey(this .<.> builder, TKey key) - where TKey : notnull { } - public static .<.> DoesNotContainKey(this .<.> builder, TKey key) - where TKey : notnull { } - public static .<.> DoesNotContainKey(this .<.> builder, TKey key) - where TKey : notnull { } - public static . HasCount(this .<.> builder) - where TKey : notnull { } - public static . HasCount(this .<.> builder) { } + public class AssemblyAssemblyAssertionExtensionsIsDebugBuildWithAssemblyAssertCondition : .<.Assembly> + { + public AssemblyAssemblyAssertionExtensionsIsDebugBuildWithAssemblyAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Assembly? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } } - public static class EnumAssertionExtensions + public class AssemblyAssemblyAssertionExtensionsIsSignedWithAssemblyAssertCondition : .<.Assembly> { - public static . DoesNotHaveFlag(this . builder, TEnum flag) - where TEnum : { } - public static . DoesNotHaveFlag(this . builder, TEnum flag) - where TEnum : { } - public static . DoesNotHaveSameNameAs(this . builder, other) - where TEnum : { } - public static . DoesNotHaveSameNameAs(this . builder, other) - where TEnum : { } - public static . DoesNotHaveSameValueAs(this . builder, other) - where TEnum : { } - public static . HasFlag(this . builder, TEnum flag) - where TEnum : { } - public static . HasFlag(this . builder, TEnum flag) - where TEnum : { } - public static . HasSameNameAs(this . builder, other) - where TEnum : { } - public static . HasSameNameAs(this . builder, other) - where TEnum : { } - public static . HasSameValueAs(this . builder, other) - where TEnum : { } - public static . IsDefined(this . builder) - where TEnum : { } - public static . IsDefined(this . builder) - where TEnum : { } - public static . IsNotDefined(this . builder) - where TEnum : { } - public static . IsNotDefined(this . builder) - where TEnum : { } + public AssemblyAssemblyAssertionExtensionsIsSignedWithAssemblyAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Assembly? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.<.Assembly>("GlobalAssemblyCache")] + [.<.Assembly>("GlobalAssemblyCache", CustomName="IsNotInGAC", NegateLogic=true)] + [.<.Assembly>("IsDynamic")] + [.<.Assembly>("IsDynamic", CustomName="IsNotDynamic", NegateLogic=true)] + [.<.Assembly>("IsFullyTrusted")] + [.<.Assembly>("IsFullyTrusted", CustomName="IsNotFullyTrusted", NegateLogic=true)] + [.<.Assembly>(typeof(.), "IsDebugBuild")] + [.<.Assembly>(typeof(.), "IsDebugBuild", CustomName="IsReleaseBuild", NegateLogic=true)] + [.<.Assembly>(typeof(.), "IsSigned")] + [.<.Assembly>(typeof(.), "IsSigned", CustomName="IsNotSigned", NegateLogic=true)] + public static class AssemblyAssertionExtensions + { + public static .<.Assembly> GlobalAssemblyCache(this ..IValueSource<.Assembly> valueSource) { } + public static .<.Assembly> IsDebugBuild(this ..IValueSource<.Assembly> valueSource) { } + public static .<.Assembly> IsDynamic(this ..IValueSource<.Assembly> valueSource) { } + public static .<.Assembly> IsFullyTrusted(this ..IValueSource<.Assembly> valueSource) { } + public static .<.Assembly> IsNotDynamic(this ..IValueSource<.Assembly> valueSource) { } + public static .<.Assembly> IsNotFullyTrusted(this ..IValueSource<.Assembly> valueSource) { } + public static .<.Assembly> IsNotInGAC(this ..IValueSource<.Assembly> valueSource) { } + public static .<.Assembly> IsNotSigned(this ..IValueSource<.Assembly> valueSource) { } + public static .<.Assembly> IsReleaseBuild(this ..IValueSource<.Assembly> valueSource) { } + public static .<.Assembly> IsSigned(this ..IValueSource<.Assembly> valueSource) { } + } + public class AssemblyGlobalAssemblyCacheAssertCondition : .<.Assembly> + { + public AssemblyGlobalAssemblyCacheAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Assembly? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } } - public static class ExceptionAssertionExtensions + public class AssemblyIsDynamicAssertCondition : .<.Assembly> { - public static . HasMessageContaining(this . builder, string substring) - where TException : { } - public static . HasMessageContaining(this . builder, string substring) - where TException : { } - public static . HasMessageEndingWith(this . builder, string suffix) - where TException : { } - public static . HasMessageEndingWith(this . assertion, string suffix) - where TException : { } - public static . HasMessageEndingWith(this . builder, string suffix) - where TException : { } - public static . HasMessageEqualTo(this . builder, string expectedMessage) - where TException : { } - public static . HasMessageMatching(this . assertion, string pattern) - where TException : { } - public static . HasMessageStartingWith(this . builder, string prefix) - where TException : { } - public static . HasMessageStartingWith(this . assertion, string prefix) - where TException : { } - public static . HasMessageStartingWith(this . builder, string prefix) - where TException : { } + public AssemblyIsDynamicAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Assembly? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class AssemblyIsFullyTrustedAssertCondition : .<.Assembly> + { + public AssemblyIsFullyTrustedAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Assembly? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public static class BooleanIsExtensions + { + public static . IsEqualTo(this ..IValueSource valueSource, bool expected) { } + public static . IsEqualTo(this ..IValueSource valueSource, bool expected) { } + public static . IsEqualTo(this ..IValueSource valueSource, bool? expected) { } + public static . IsFalse(this ..IValueSource valueSource) { } + public static . IsFalse(this ..IValueSource valueSource) { } + public static . IsTrue(this ..IValueSource valueSource) { } + public static . IsTrue(this ..IValueSource valueSource) { } + } + public static class BooleanIsNotExtensions + { + public static . IsNotEqualTo(this ..IValueSource valueSource, bool expected) { } + public static . IsNotEqualTo(this ..IValueSource valueSource, bool expected) { } + public static . IsNotEqualTo(this ..IValueSource valueSource, bool? expected) { } + public static . IsNotFalse(this ..IValueSource valueSource) { } + public static . IsNotFalse(this ..IValueSource valueSource) { } + public static . IsNotTrue(this ..IValueSource valueSource) { } + public static . IsNotTrue(this ..IValueSource valueSource) { } + } + [.<.CancellationToken>("CanBeCanceled")] + [.<.CancellationToken>("CanBeCanceled", CustomName="CannotBeCanceled", NegateLogic=true)] + [.<.CancellationToken>("IsCancellationRequested")] + [.<.CancellationToken>("IsCancellationRequested", CustomName="IsNotCancellationRequested", NegateLogic=true)] + [.<.CancellationToken>(typeof(.), "IsNone")] + [.<.CancellationToken>(typeof(.), "IsNone", CustomName="IsNotNone", NegateLogic=true)] + public static class CancellationTokenAssertionExtensions + { + public static .<.CancellationToken> CanBeCanceled(this ..IValueSource<.CancellationToken> valueSource) { } + public static .<.CancellationToken> CannotBeCanceled(this ..IValueSource<.CancellationToken> valueSource) { } + public static .<.CancellationToken> IsCancellationRequested(this ..IValueSource<.CancellationToken> valueSource) { } + public static .<.CancellationToken> IsNone(this ..IValueSource<.CancellationToken> valueSource) { } + public static .<.CancellationToken> IsNotCancellationRequested(this ..IValueSource<.CancellationToken> valueSource) { } + public static .<.CancellationToken> IsNotNone(this ..IValueSource<.CancellationToken> valueSource) { } + } + public class CancellationTokenCanBeCanceledAssertCondition : .<.CancellationToken> + { + public CancellationTokenCanBeCanceledAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.CancellationToken actualValue, ? exception, .AssertionMetadata assertionMetadata) { } } - public static class GenericAssertionExtensions - { - public static . DoesNotHaveMember(this . builder, string memberName) { } - public static . DoesNotHaveMember(this . builder, string memberName) { } - public static . HasMember(this . builder, string memberName) { } - public static . HasMember(this . builder, string memberName) { } - public static . HasMember(this . builder, .<> memberSelector) { } - public static . IsDefault(this . builder) { } - public static . IsDefault(this . builder) { } - public static . IsNotDefault(this . builder) { } - public static . IsNotDefault(this . builder) { } - } - public static class NumericAssertionExtensions - { - public static . IsGreaterThan(this . builder, int value) { } - public static . IsGreaterThan(this . builder, byte value) { } - public static . IsGreaterThan(this . builder, decimal value) { } - public static . IsGreaterThan(this . builder, double value) { } - public static . IsGreaterThan(this . builder, float value) { } - public static . IsGreaterThan(this . builder, int value) { } - public static . IsGreaterThan(this . builder, long value) { } - public static . IsGreaterThan(this . builder, short value) { } - public static . IsGreaterThanOrEqualTo(this . builder, int value) { } - public static . IsGreaterThanOrEqualTo(this . builder, byte value) { } - public static . IsGreaterThanOrEqualTo(this . builder, decimal value) { } - public static . IsGreaterThanOrEqualTo(this . builder, double value) { } - public static . IsGreaterThanOrEqualTo(this . builder, float value) { } - public static . IsGreaterThanOrEqualTo(this . builder, int value) { } - public static . IsGreaterThanOrEqualTo(this . builder, long value) { } - public static . IsGreaterThanOrEqualTo(this . builder, short value) { } - public static . IsLessThan(this . builder, int value) { } - public static . IsLessThan(this . builder, byte value) { } - public static . IsLessThan(this . builder, decimal value) { } - public static . IsLessThan(this . builder, double value) { } - public static . IsLessThan(this . builder, float value) { } - public static . IsLessThan(this . builder, int value) { } - public static . IsLessThan(this . builder, long value) { } - public static . IsLessThan(this . builder, short value) { } - public static . IsLessThanOrEqualTo(this . builder, int value) { } - public static . IsLessThanOrEqualTo(this . builder, byte value) { } - public static . IsLessThanOrEqualTo(this . builder, decimal value) { } - public static . IsLessThanOrEqualTo(this . builder, double value) { } - public static . IsLessThanOrEqualTo(this . builder, float value) { } - public static . IsLessThanOrEqualTo(this . builder, int value) { } - public static . IsLessThanOrEqualTo(this . builder, long value) { } - public static . IsLessThanOrEqualTo(this . builder, short value) { } - public static . IsNegative(this . builder) { } - public static . IsNegative(this . builder) { } - public static . IsNegative(this . builder) { } - public static . IsNegative(this . builder) { } - public static . IsNegative(this . builder) { } - public static . IsNegative(this . builder) { } - public static . IsNegative(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } - public static . IsPositive(this . builder) { } + public class CancellationTokenCancellationTokenAssertionExtensionsIsNoneWithCancellationTokenAssertCondition : .<.CancellationToken> + { + public CancellationTokenCancellationTokenAssertionExtensionsIsNoneWithCancellationTokenAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.CancellationToken actualValue, ? exception, .AssertionMetadata assertionMetadata) { } } - public static class StringAssertionExtensions + public class CancellationTokenIsCancellationRequestedAssertCondition : .<.CancellationToken> { - public static . Contains(this . builder, string substring) { } - public static . Contains(this . builder, string substring) { } - public static . DoesNotContain(this . builder, string substring) { } - public static . DoesNotContain(this . builder, string substring) { } - public static . DoesNotMatch(this . builder, . regex) { } - public static . DoesNotMatch(this . builder, string pattern) { } - public static . DoesNotMatch(this . builder, . regex) { } - public static . DoesNotMatch(this . builder, string pattern) { } - public static . EndsWith(this . builder, string suffix) { } - public static . EndsWith(this . builder, string suffix) { } - public static . HasCount(this . builder) { } - public static . HasLength(this . builder) { } - public static . HasLength(this . builder) { } - public static . HasLength(this . builder, int expectedLength) { } - public static . HasLength(this . builder, int expectedLength) { } - public static . IsEmpty(this . builder) { } - public static . IsEmpty(this . builder) { } - public static . IsEqualTo(this . builder, string expected, comparisonType) { } - public static . IsEqualTo(this . builder, string expected, comparisonType) { } - public static . IsNotEmpty(this . builder) { } - public static . IsNotEmpty(this . builder) { } - public static . IsNotEqualTo(this . builder, string expected, comparisonType) { } - public static . IsNotEqualTo(this . builder, string expected, comparisonType) { } - public static . IsNotNullOrEmpty(this . builder) { } - public static . IsNotNullOrWhiteSpace(this . builder) { } - public static . IsNotNullOrWhitespace(this . builder) { } - public static . IsNotNullOrWhitespace(this . builder) { } - public static . IsNullOrEmpty(this . builder) { } - public static . IsNullOrWhiteSpace(this . builder) { } - public static . IsNullOrWhitespace(this . builder) { } - public static . IsNullOrWhitespace(this . builder) { } - public static . Matches(this . builder, . regex) { } - public static . Matches(this . builder, string pattern) { } - public static . Matches(this . builder, . regex) { } - public static . Matches(this . builder, string pattern) { } - public static . StartsWith(this . builder, string prefix) { } - public static . StartsWith(this . builder, string prefix) { } + public CancellationTokenIsCancellationRequestedAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.CancellationToken actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.("IsControl")] + [.("IsControl", CustomName="IsNotControl", NegateLogic=true)] + [.("IsDigit")] + [.("IsDigit", CustomName="IsNotDigit", NegateLogic=true)] + [.("IsHighSurrogate")] + [.("IsHighSurrogate", CustomName="IsNotHighSurrogate", NegateLogic=true)] + [.("IsLetter")] + [.("IsLetter", CustomName="IsNotLetter", NegateLogic=true)] + [.("IsLetterOrDigit")] + [.("IsLetterOrDigit", CustomName="IsNotLetterOrDigit", NegateLogic=true)] + [.("IsLowSurrogate")] + [.("IsLowSurrogate", CustomName="IsNotLowSurrogate", NegateLogic=true)] + [.("IsLower")] + [.("IsLower", CustomName="IsNotLower", NegateLogic=true)] + [.("IsNumber")] + [.("IsNumber", CustomName="IsNotNumber", NegateLogic=true)] + [.("IsPunctuation")] + [.("IsPunctuation", CustomName="IsNotPunctuation", NegateLogic=true)] + [.("IsSeparator")] + [.("IsSeparator", CustomName="IsNotSeparator", NegateLogic=true)] + [.("IsSurrogate")] + [.("IsSurrogate", CustomName="IsNotSurrogate", NegateLogic=true)] + [.("IsSymbol")] + [.("IsSymbol", CustomName="IsNotSymbol", NegateLogic=true)] + [.("IsUpper")] + [.("IsUpper", CustomName="IsNotUpper", NegateLogic=true)] + [.("IsWhiteSpace")] + [.("IsWhiteSpace", CustomName="IsNotWhiteSpace", NegateLogic=true)] + public static class CharAssertionExtensions + { + public static . IsControl(this ..IValueSource valueSource) { } + public static . IsDigit(this ..IValueSource valueSource) { } + public static . IsHighSurrogate(this ..IValueSource valueSource) { } + public static . IsLetter(this ..IValueSource valueSource) { } + public static . IsLetterOrDigit(this ..IValueSource valueSource) { } + public static . IsLowSurrogate(this ..IValueSource valueSource) { } + public static . IsLower(this ..IValueSource valueSource) { } + public static . IsNotControl(this ..IValueSource valueSource) { } + public static . IsNotDigit(this ..IValueSource valueSource) { } + public static . IsNotHighSurrogate(this ..IValueSource valueSource) { } + public static . IsNotLetter(this ..IValueSource valueSource) { } + public static . IsNotLetterOrDigit(this ..IValueSource valueSource) { } + public static . IsNotLowSurrogate(this ..IValueSource valueSource) { } + public static . IsNotLower(this ..IValueSource valueSource) { } + public static . IsNotNumber(this ..IValueSource valueSource) { } + public static . IsNotPunctuation(this ..IValueSource valueSource) { } + public static . IsNotSeparator(this ..IValueSource valueSource) { } + public static . IsNotSurrogate(this ..IValueSource valueSource) { } + public static . IsNotSymbol(this ..IValueSource valueSource) { } + public static . IsNotUpper(this ..IValueSource valueSource) { } + public static . IsNotWhiteSpace(this ..IValueSource valueSource) { } + public static . IsNumber(this ..IValueSource valueSource) { } + public static . IsPunctuation(this ..IValueSource valueSource) { } + public static . IsSeparator(this ..IValueSource valueSource) { } + public static . IsSurrogate(this ..IValueSource valueSource) { } + public static . IsSymbol(this ..IValueSource valueSource) { } + public static . IsUpper(this ..IValueSource valueSource) { } + public static . IsWhiteSpace(this ..IValueSource valueSource) { } + } + public class CharIsControlWithCharAssertCondition : . + { + public CharIsControlWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } } - public static class StringExtensions + public class CharIsDigitWithCharAssertCondition : . { - public static string GetStringOr(this string? value, string defaultValue) { } - public static string GetStringOrEmpty(this string? value) { } - public static string PrependAOrAn(this string value) { } - public static string ReplaceNewLines(this string value) { } - public static string ShowNewLines(this string value) { } - public static string TruncateWithEllipsis(this string value, int maxLength) { } + public CharIsDigitWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } } - public static class StringParseExtensions + public static class CharIsExtensions { - public static . IsNotParsableInto(this . builder) { } - public static . IsNotParsableInto(this . builder) { } - public static . IsParsableInto(this . builder) { } - public static . IsParsableInto(this . builder) { } - public static . IsParsableInto(this . builder, ? formatProvider) { } - public static . WhenParsedInto(this . builder) { } - public static . WhenParsedInto(this . builder) { } + public static . IsEqualTo(this ..IValueSource valueSource, char expected) { } + public static . IsEqualTo(this ..IValueSource valueSource, char expected) { } + public static . IsEqualTo(this ..IValueSource valueSource, char? expected) { } } - public static class TimeSpanExtensions + public class CharIsHighSurrogateWithCharAssertCondition : . { - public static Days(this int days) { } - public static Hours(this int hours) { } - public static Milliseconds(this int milliseconds) { } - public static Minutes(this int minutes) { } - public static Seconds(this int seconds) { } + public CharIsHighSurrogateWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CharIsLetterOrDigitWithCharAssertCondition : . + { + public CharIsLetterOrDigitWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CharIsLetterWithCharAssertCondition : . + { + public CharIsLetterWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CharIsLowSurrogateWithCharAssertCondition : . + { + public CharIsLowSurrogateWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CharIsLowerWithCharAssertCondition : . + { + public CharIsLowerWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public static class CharIsNotExtensions + { + public static . IsNotEqualTo(this ..IValueSource valueSource, char expected) { } + public static . IsNotEqualTo(this ..IValueSource valueSource, char expected) { } + public static . IsNotEqualTo(this ..IValueSource valueSource, char? expected) { } + } + public class CharIsNumberWithCharAssertCondition : . + { + public CharIsNumberWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CharIsPunctuationWithCharAssertCondition : . + { + public CharIsPunctuationWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CharIsSeparatorWithCharAssertCondition : . + { + public CharIsSeparatorWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CharIsSurrogateWithCharAssertCondition : . + { + public CharIsSurrogateWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CharIsSymbolWithCharAssertCondition : . + { + public CharIsSymbolWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CharIsUpperWithCharAssertCondition : . + { + public CharIsUpperWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CharIsWhiteSpaceWithCharAssertCondition : . + { + public CharIsWhiteSpaceWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CharUriIsHexDigitWithCharAssertCondition : . + { + public CharUriIsHexDigitWithCharAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(char actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public static class CollectionsIsExtensions + { + public static .<.> IsEmpty(this ..IValueSource<.> valueSource) { } + public static . IsEquivalentTo(this ..IValueSource valueSource, . expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : . { } + public static . IsEquivalentTo(this ..IValueSource valueSource, . expected, . comparer, [.("expected")] string doNotPopulateThisValue = null, [.("comparer")] string doNotPopulateThisValue2 = null) + where TActual : . { } + public static . IsEquivalentTo(this ..IValueSource valueSource, . expected, . collectionOrdering, [.("expected")] string doNotPopulateThisValue = null, [.("collectionOrdering")] string doNotPopulateThisValue2 = null) + where TActual : . { } + public static . IsEquivalentTo(this ..IValueSource valueSource, . expected, . comparer, . collectionOrdering, [.("expected")] string doNotPopulateThisValue = null, [.("collectionOrdering")] string doNotPopulateThisValue2 = null) + where TActual : . { } + public static .<.> IsInDescendingOrder(this ..IValueSource<.> valueSource) { } + public static .<.> IsInDescendingOrder(this ..IValueSource<.> valueSource, . comparer) { } + public static .<.> IsInOrder(this ..IValueSource<.> valueSource) { } + public static .<.> IsInOrder(this ..IValueSource<.> valueSource, . comparer) { } + public static .<.> IsOrderedBy(this ..IValueSource<.> valueSource, comparisonItemSelector, [.("comparisonItemSelector")] string doNotPopulateThisValue = null) { } + public static .<.> IsOrderedBy(this ..IValueSource<.> valueSource, comparisonItemSelector, . comparer, [.("comparisonItemSelector")] string doNotPopulateThisValue = null, [.("comparer")] string doNotPopulateThisValue2 = null) { } + public static .<.> IsOrderedByDescending(this ..IValueSource<.> valueSource, comparisonItemSelector, [.("comparisonItemSelector")] string doNotPopulateThisValue = null) { } + public static .<.> IsOrderedByDescending(this ..IValueSource<.> valueSource, comparisonItemSelector, . comparer, [.("comparisonItemSelector")] string doNotPopulateThisValue = null, [.("comparer")] string doNotPopulateThisValue2 = null) { } + } + public static class CollectionsIsNotExtensions + { + public static .<.> IsNotEmpty(this ..IValueSource<.> valueSource) { } + public static . IsNotEquivalentTo(this ..IValueSource valueSource, . expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : . { } + public static . IsNotEquivalentTo(this ..IValueSource valueSource, . expected, . comparer, [.("expected")] string doNotPopulateThisValue = null, [.("comparer")] string doNotPopulateThisValue2 = null) + where TActual : . { } + public static . IsNotEquivalentTo(this ..IValueSource valueSource, . expected, . collectionOrdering, [.("expected")] string doNotPopulateThisValue = null, [.("collectionOrdering")] string doNotPopulateThisValue2 = null) + where TActual : . { } + public static . IsNotEquivalentTo(this ..IValueSource valueSource, . expected, . comparer, . collectionOrdering, [.("expected")] string doNotPopulateThisValue = null, [.("collectionOrdering")] string doNotPopulateThisValue2 = null) + where TActual : . { } + } + public static class ComparableIsExtensions + { + public static ..BetweenAssertionBuilderWrapper IsBetween(this ..IValueSource valueSource, TActual lowerBound, TActual upperBound, [.("lowerBound")] string doNotPopulateThisValue1 = null, [.("upperBound")] string doNotPopulateThisValue2 = null) + where TActual : { } + public static . IsGreaterThan(this ..IValueSource valueSource, TActual expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : { } + public static . IsGreaterThanOrEqualTo(this ..IValueSource valueSource, TActual expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : { } + public static . IsLessThan(this ..IValueSource valueSource, TActual expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : { } + public static . IsLessThanOrEqualTo(this ..IValueSource valueSource, TActual expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : { } + } + public static class ComparableIsNotExtensions + { + public static ..NotBetweenAssertionBuilderWrapper IsNotBetween(this ..IValueSource valueSource, TActual lowerBound, TActual upperBound, [.("lowerBound")] string doNotPopulateThisValue1 = null, [.("upperBound")] string doNotPopulateThisValue2 = null) + where TActual : { } + public static . IsNotGreaterThan(this ..IValueSource valueSource, TActual expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : { } + public static . IsNotGreaterThanOrEqualTo(this ..IValueSource valueSource, TActual expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : { } + public static . IsNotLessThan(this ..IValueSource valueSource, TActual expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : { } + public static . IsNotLessThanOrEqualTo(this ..IValueSource valueSource, TActual expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : { } + } + [.<.CultureInfo>("IsNeutralCulture")] + [.<.CultureInfo>("IsNeutralCulture", CustomName="IsNotNeutralCulture", NegateLogic=true)] + [.<.CultureInfo>("IsReadOnly")] + [.<.CultureInfo>("IsReadOnly", CustomName="IsNotReadOnly", NegateLogic=true)] + [.<.CultureInfo>(typeof(.), "IsEnglish")] + [.<.CultureInfo>(typeof(.), "IsEnglish", CustomName="IsNotEnglish", NegateLogic=true)] + [.<.CultureInfo>(typeof(.), "IsInvariant")] + [.<.CultureInfo>(typeof(.), "IsInvariant", CustomName="IsNotInvariant", NegateLogic=true)] + [.<.CultureInfo>(typeof(.), "IsRightToLeft")] + [.<.CultureInfo>(typeof(.), "IsRightToLeft", CustomName="IsLeftToRight", NegateLogic=true)] + public static class CultureInfoAssertionExtensions + { + public static .<.CultureInfo> IsEnglish(this ..IValueSource<.CultureInfo> valueSource) { } + public static .<.CultureInfo> IsInvariant(this ..IValueSource<.CultureInfo> valueSource) { } + public static .<.CultureInfo> IsLeftToRight(this ..IValueSource<.CultureInfo> valueSource) { } + public static .<.CultureInfo> IsNeutralCulture(this ..IValueSource<.CultureInfo> valueSource) { } + public static .<.CultureInfo> IsNotEnglish(this ..IValueSource<.CultureInfo> valueSource) { } + public static .<.CultureInfo> IsNotInvariant(this ..IValueSource<.CultureInfo> valueSource) { } + public static .<.CultureInfo> IsNotNeutralCulture(this ..IValueSource<.CultureInfo> valueSource) { } + public static .<.CultureInfo> IsNotReadOnly(this ..IValueSource<.CultureInfo> valueSource) { } + public static .<.CultureInfo> IsReadOnly(this ..IValueSource<.CultureInfo> valueSource) { } + public static .<.CultureInfo> IsRightToLeft(this ..IValueSource<.CultureInfo> valueSource) { } + } + public class CultureInfoCultureInfoAssertionExtensionsIsEnglishWithCultureInfoAssertCondition : .<.CultureInfo> + { + public CultureInfoCultureInfoAssertionExtensionsIsEnglishWithCultureInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.CultureInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CultureInfoCultureInfoAssertionExtensionsIsInvariantWithCultureInfoAssertCondition : .<.CultureInfo> + { + public CultureInfoCultureInfoAssertionExtensionsIsInvariantWithCultureInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.CultureInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CultureInfoCultureInfoAssertionExtensionsIsRightToLeftWithCultureInfoAssertCondition : .<.CultureInfo> + { + public CultureInfoCultureInfoAssertionExtensionsIsRightToLeftWithCultureInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.CultureInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CultureInfoIsNeutralCultureAssertCondition : .<.CultureInfo> + { + public CultureInfoIsNeutralCultureAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.CultureInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class CultureInfoIsReadOnlyAssertCondition : .<.CultureInfo> + { + public CultureInfoIsReadOnlyAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.CultureInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.<>(typeof(), "IsDaylightSavingTime")] + [.<>(typeof(), "IsDaylightSavingTime", CustomName="IsNotDaylightSavingTime", NegateLogic=true)] + [.<>(typeof(.), "IsLeapYear")] + [.<>(typeof(.), "IsLeapYear", CustomName="IsNotLeapYear", NegateLogic=true)] + [.<>(typeof(.), "IsToday")] + [.<>(typeof(.), "IsToday", CustomName="IsNotToday", NegateLogic=true)] + [.<>(typeof(.), "IsUtc")] + [.<>(typeof(.), "IsUtc", CustomName="IsNotUtc", NegateLogic=true)] + [.<>(typeof(.), "IsWeekend")] + [.<>(typeof(.), "IsWeekend", CustomName="IsWeekday", NegateLogic=true)] + [.<>(typeof(), "EqualsExact")] + public static class DateTimeAssertionExtensions + { + public static .<> EqualsExact(this ..IValueSource<> valueSource, other, [.("other")] string? doNotPopulateThisValue1 = null) { } + public static .<> IsDaylightSavingTime(this ..IValueSource<> valueSource) { } + public static .<> IsLeapYear(this ..IValueSource<> valueSource) { } + public static .<> IsNotDaylightSavingTime(this ..IValueSource<> valueSource) { } + public static .<> IsNotLeapYear(this ..IValueSource<> valueSource) { } + public static .<> IsNotToday(this ..IValueSource<> valueSource) { } + public static .<> IsNotUtc(this ..IValueSource<> valueSource) { } + public static .<> IsToday(this ..IValueSource<> valueSource) { } + public static .<> IsUtc(this ..IValueSource<> valueSource) { } + public static .<> IsWeekday(this ..IValueSource<> valueSource) { } + public static .<> IsWeekend(this ..IValueSource<> valueSource) { } + } + public class DateTimeDateTimeAssertionExtensionsIsLeapYearWithDateTimeAssertCondition : .<> + { + public DateTimeDateTimeAssertionExtensionsIsLeapYearWithDateTimeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DateTimeDateTimeAssertionExtensionsIsTodayWithDateTimeAssertCondition : .<> + { + public DateTimeDateTimeAssertionExtensionsIsTodayWithDateTimeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DateTimeDateTimeAssertionExtensionsIsUtcWithDateTimeAssertCondition : .<> + { + public DateTimeDateTimeAssertionExtensionsIsUtcWithDateTimeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DateTimeDateTimeAssertionExtensionsIsWeekendWithDateTimeAssertCondition : .<> + { + public DateTimeDateTimeAssertionExtensionsIsWeekendWithDateTimeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DateTimeIsDaylightSavingTimeAssertCondition : .<> + { + public DateTimeIsDaylightSavingTimeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public static class DateTimeIsExtensions + { + public static .<> IsAfter(this ..IValueSource<> valueSource, expected, [.("expected")] string doNotPopulateThisValue = null) { } + public static .<> IsAfterOrEqualTo(this ..IValueSource<> valueSource, expected, [.("expected")] string doNotPopulateThisValue = null) { } + public static .<> IsBefore(this ..IValueSource<> valueSource, expected, [.("expected")] string doNotPopulateThisValue = null) { } + public static .<> IsBeforeOrEqualTo(this ..IValueSource<> valueSource, expected, [.("expected")] string doNotPopulateThisValue = null) { } + public static ..DateTimeEqualToAssertionBuilderWrapper IsEqualTo(this ..IValueSource<> valueSource, expected, [.("expected")] string doNotPopulateThisValue1 = null) { } + } + public class DateTimeOffsetEqualsExactWithDateTimeOffsetAssertCondition : .<> + { + public DateTimeOffsetEqualsExactWithDateTimeOffsetAssertCondition( other, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public static class DateTimeOffsetIsExtensions + { + public static .<> IsAfter(this ..IValueSource<> valueSource, expected, [.("expected")] string doNotPopulateThisValue = null) { } + public static .<> IsAfterOrEqualTo(this ..IValueSource<> valueSource, expected, [.("expected")] string doNotPopulateThisValue = null) { } + public static .<> IsBefore(this ..IValueSource<> valueSource, expected, [.("expected")] string doNotPopulateThisValue = null) { } + public static .<> IsBeforeOrEqualTo(this ..IValueSource<> valueSource, expected, [.("expected")] string doNotPopulateThisValue = null) { } + public static ..DateTimeOffsetEqualToAssertionBuilderWrapper IsEqualTo(this ..IValueSource<> valueSource, expected, [.("expected")] string doNotPopulateThisValue1 = null) { } + } + [.<>(typeof(.), "IsFriday")] + [.<>(typeof(.), "IsFriday", CustomName="IsNotFriday", NegateLogic=true)] + [.<>(typeof(.), "IsMonday")] + [.<>(typeof(.), "IsMonday", CustomName="IsNotMonday", NegateLogic=true)] + [.<>(typeof(.), "IsWeekend")] + [.<>(typeof(.), "IsWeekend", CustomName="IsWeekday", NegateLogic=true)] + public static class DayOfWeekAssertionExtensions + { + public static .<> IsFriday(this ..IValueSource<> valueSource) { } + public static .<> IsMonday(this ..IValueSource<> valueSource) { } + public static .<> IsNotFriday(this ..IValueSource<> valueSource) { } + public static .<> IsNotMonday(this ..IValueSource<> valueSource) { } + public static .<> IsWeekday(this ..IValueSource<> valueSource) { } + public static .<> IsWeekend(this ..IValueSource<> valueSource) { } + } + public class DayOfWeekDayOfWeekAssertionExtensionsIsFridayWithDayOfWeekAssertCondition : .<> + { + public DayOfWeekDayOfWeekAssertionExtensionsIsFridayWithDayOfWeekAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DayOfWeekDayOfWeekAssertionExtensionsIsMondayWithDayOfWeekAssertCondition : .<> + { + public DayOfWeekDayOfWeekAssertionExtensionsIsMondayWithDayOfWeekAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DayOfWeekDayOfWeekAssertionExtensionsIsWeekendWithDayOfWeekAssertCondition : .<> + { + public DayOfWeekDayOfWeekAssertionExtensionsIsWeekendWithDayOfWeekAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.<.DirectoryInfo>("Exists")] + [.<.DirectoryInfo>("Exists", CustomName="DoesNotExist", NegateLogic=true)] + [.<.DirectoryInfo>(typeof(.), "HasFiles")] + [.<.DirectoryInfo>(typeof(.), "HasFiles", CustomName="HasNoFiles", NegateLogic=true)] + [.<.DirectoryInfo>(typeof(.), "HasSubdirectories")] + [.<.DirectoryInfo>(typeof(.), "HasSubdirectories", CustomName="HasNoSubdirectories", NegateLogic=true)] + [.<.DirectoryInfo>(typeof(.), "IsEmpty")] + [.<.DirectoryInfo>(typeof(.), "IsEmpty", CustomName="IsNotEmpty", NegateLogic=true)] + [.<.DirectoryInfo>(typeof(.), "IsHidden")] + [.<.DirectoryInfo>(typeof(.), "IsHidden", CustomName="IsNotHidden", NegateLogic=true)] + [.<.DirectoryInfo>(typeof(.), "IsReadOnly")] + [.<.DirectoryInfo>(typeof(.), "IsReadOnly", CustomName="IsNotReadOnly", NegateLogic=true)] + [.<.DirectoryInfo>(typeof(.), "IsSystem")] + [.<.DirectoryInfo>(typeof(.), "IsSystem", CustomName="IsNotSystem", NegateLogic=true)] + public static class DirectoryInfoAssertionExtensions + { + public static .<.DirectoryInfo> DoesNotExist(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> Exists(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> HasFiles(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> HasNoFiles(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> HasNoSubdirectories(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> HasSubdirectories(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> IsEmpty(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> IsHidden(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> IsNotEmpty(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> IsNotHidden(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> IsNotReadOnly(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> IsNotSystem(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> IsReadOnly(this ..IValueSource<.DirectoryInfo> valueSource) { } + public static .<.DirectoryInfo> IsSystem(this ..IValueSource<.DirectoryInfo> valueSource) { } + } + public class DirectoryInfoDirectoryInfoAssertionExtensionsHasFilesWithDirectoryInfoAssertCondition : .<.DirectoryInfo> + { + public DirectoryInfoDirectoryInfoAssertionExtensionsHasFilesWithDirectoryInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.DirectoryInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DirectoryInfoDirectoryInfoAssertionExtensionsHasSubdirectoriesWithDirectoryInfoAssertCondition : .<.DirectoryInfo> + { + public DirectoryInfoDirectoryInfoAssertionExtensionsHasSubdirectoriesWithDirectoryInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.DirectoryInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DirectoryInfoDirectoryInfoAssertionExtensionsIsEmptyWithDirectoryInfoAssertCondition : .<.DirectoryInfo> + { + public DirectoryInfoDirectoryInfoAssertionExtensionsIsEmptyWithDirectoryInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.DirectoryInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DirectoryInfoDirectoryInfoAssertionExtensionsIsHiddenWithDirectoryInfoAssertCondition : .<.DirectoryInfo> + { + public DirectoryInfoDirectoryInfoAssertionExtensionsIsHiddenWithDirectoryInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.DirectoryInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DirectoryInfoDirectoryInfoAssertionExtensionsIsReadOnlyWithDirectoryInfoAssertCondition : .<.DirectoryInfo> + { + public DirectoryInfoDirectoryInfoAssertionExtensionsIsReadOnlyWithDirectoryInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.DirectoryInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DirectoryInfoDirectoryInfoAssertionExtensionsIsSystemWithDirectoryInfoAssertCondition : .<.DirectoryInfo> + { + public DirectoryInfoDirectoryInfoAssertionExtensionsIsSystemWithDirectoryInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.DirectoryInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class DirectoryInfoExistsAssertCondition : .<.DirectoryInfo> + { + public DirectoryInfoExistsAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.DirectoryInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public static class DoesExtensions + { + public static ..StringContainsAssertionBuilderWrapper Contains(this ..IValueSource valueSource, string expected, [.("expected")] string doNotPopulateThisValue = null) { } + public static ..StringContainsAssertionBuilderWrapper Contains(this ..IValueSource valueSource, string expected, stringComparison, [.("expected")] string doNotPopulateThisValue1 = null, [.("stringComparison")] string doNotPopulateThisValue2 = null) { } + public static .<., ..EnumerableContainsExpectedFuncAssertCondition<., TInner>, TInner> Contains(this ..IValueSource<.> valueSource, matcher, [.("matcher")] string doNotPopulateThisValue = null) { } + public static . Contains(this ..IValueSource valueSource, TInner expected, . equalityComparer = null, [.("expected")] string doNotPopulateThisValue = null) + where TActual : . { } + public static .<.> ContainsKey(this ..IValueSource<.> valueSource, TKey expected, . equalityComparer = null, [.("expected")] string doNotPopulateThisValue = null) { } + public static . ContainsKey(this ..IValueSource valueSource, TKey expected, . equalityComparer = null, [.("expected")] string doNotPopulateThisValue = null) + where TDictionary : .IDictionary { } + public static .<.> ContainsOnly(this ..IValueSource<.> valueSource, matcher, [.("matcher")] string doNotPopulateThisValue = null) { } + public static . ContainsValue(this ..IValueSource valueSource, TValue expected, . equalityComparer = null, [.("expected")] string doNotPopulateThisValue = null) + where TDictionary : .IDictionary { } + public static . Matches(this ..IValueSource valueSource, . regex, [.("regex")] string expression = "") { } + public static . Matches(this ..IValueSource valueSource, string regex, [.("regex")] string expression = "") { } + } + public static class DoesNotExtensions + { + public static .<.> DoesNotContain(this ..IValueSource<.> valueSource, matcher, [.("matcher")] string? doNotPopulateThisValue = null) { } + public static . DoesNotContain(this ..IValueSource valueSource, TInner expected, .? equalityComparer = null, [.("expected")] string? doNotPopulateThisValue = null) + where TActual : . { } + public static .<.> DoesNotContainKey(this ..IValueSource<.> valueSource, TKey expected, . equalityComparer = null, [.("expected")] string doNotPopulateThisValue = null) { } + public static . DoesNotContainKey(this ..IValueSource valueSource, TKey expected, . equalityComparer = null, [.("expected")] string doNotPopulateThisValue = null) + where TDictionary : .IDictionary { } + public static .<.> DoesNotContainValue(this ..IValueSource<.> valueSource, TValue expected, . equalityComparer = null, [.("expected")] string doNotPopulateThisValue = null) { } + public static . DoesNotContainValue(this ..IValueSource valueSource, TValue expected, . equalityComparer = null, [.("expected")] string doNotPopulateThisValue = null) + where TDictionary : .IDictionary { } + public static . DoesNotMatch(this ..IValueSource valueSource, . regex, [.("regex")] string expression = "") { } + public static . DoesNotMatch(this ..IValueSource valueSource, string regex, [.("regex")] string expression = "") { } + } + [.<.Encoding>("IsSingleByte")] + [.<.Encoding>("IsSingleByte", CustomName="IsNotSingleByte", NegateLogic=true)] + [.<.Encoding>(typeof(.), "IsASCII")] + [.<.Encoding>(typeof(.), "IsASCII", CustomName="IsNotASCII", NegateLogic=true)] + [.<.Encoding>(typeof(.), "IsBigEndianUnicode")] + [.<.Encoding>(typeof(.), "IsBigEndianUnicode", CustomName="IsNotBigEndianUnicode", NegateLogic=true)] + [.<.Encoding>(typeof(.), "IsUTF32")] + [.<.Encoding>(typeof(.), "IsUTF32", CustomName="IsNotUTF32", NegateLogic=true)] + [.<.Encoding>(typeof(.), "IsUTF8")] + [.<.Encoding>(typeof(.), "IsUTF8", CustomName="IsNotUTF8", NegateLogic=true)] + [.<.Encoding>(typeof(.), "IsUnicode")] + [.<.Encoding>(typeof(.), "IsUnicode", CustomName="IsNotUnicode", NegateLogic=true)] + public static class EncodingAssertionExtensions + { + public static .<.Encoding> IsASCII(this ..IValueSource<.Encoding> valueSource) { } + public static .<.Encoding> IsBigEndianUnicode(this ..IValueSource<.Encoding> valueSource) { } + public static .<.Encoding> IsNotASCII(this ..IValueSource<.Encoding> valueSource) { } + public static .<.Encoding> IsNotBigEndianUnicode(this ..IValueSource<.Encoding> valueSource) { } + public static .<.Encoding> IsNotSingleByte(this ..IValueSource<.Encoding> valueSource) { } + public static .<.Encoding> IsNotUTF32(this ..IValueSource<.Encoding> valueSource) { } + public static .<.Encoding> IsNotUTF8(this ..IValueSource<.Encoding> valueSource) { } + public static .<.Encoding> IsNotUnicode(this ..IValueSource<.Encoding> valueSource) { } + public static .<.Encoding> IsSingleByte(this ..IValueSource<.Encoding> valueSource) { } + public static .<.Encoding> IsUTF32(this ..IValueSource<.Encoding> valueSource) { } + public static .<.Encoding> IsUTF8(this ..IValueSource<.Encoding> valueSource) { } + public static .<.Encoding> IsUnicode(this ..IValueSource<.Encoding> valueSource) { } + } + public class EncodingEncodingAssertionExtensionsIsASCIIWithEncodingAssertCondition : .<.Encoding> + { + public EncodingEncodingAssertionExtensionsIsASCIIWithEncodingAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Encoding? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EncodingEncodingAssertionExtensionsIsBigEndianUnicodeWithEncodingAssertCondition : .<.Encoding> + { + public EncodingEncodingAssertionExtensionsIsBigEndianUnicodeWithEncodingAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Encoding? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EncodingEncodingAssertionExtensionsIsUTF32WithEncodingAssertCondition : .<.Encoding> + { + public EncodingEncodingAssertionExtensionsIsUTF32WithEncodingAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Encoding? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EncodingEncodingAssertionExtensionsIsUTF8WithEncodingAssertCondition : .<.Encoding> + { + public EncodingEncodingAssertionExtensionsIsUTF8WithEncodingAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Encoding? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EncodingEncodingAssertionExtensionsIsUnicodeWithEncodingAssertCondition : .<.Encoding> + { + public EncodingEncodingAssertionExtensionsIsUnicodeWithEncodingAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Encoding? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EncodingIsSingleByteAssertCondition : .<.Encoding> + { + public EncodingIsSingleByteAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Encoding? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.<>("HasFlag")] + [.<>("HasFlag", CustomName="DoesNotHaveFlag", NegateLogic=true)] + public static class EnumAssertionExtensions + { + public static .<> DoesNotHaveFlag(this ..IValueSource<> valueSource, flag, [.("flag")] string? doNotPopulateThisValue1 = null) { } + public static .<> HasFlag(this ..IValueSource<> valueSource, flag, [.("flag")] string? doNotPopulateThisValue1 = null) { } + public static . IsDefined(this ..IValueSource valueSource) + where TEnum : struct, { } + public static . IsNotDefined(this ..IValueSource valueSource) + where TEnum : struct, { } + } + public class EnumHasFlagWithEnumAssertCondition : .<> + { + public EnumHasFlagWithEnumAssertCondition( flag, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class EnumerableCount + where TActual : . + { + public EnumerableCount(..IValueSource valueSource) { } + public . Empty { get; } + public . EqualTo(int expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . EqualToOne() { } + public . EqualToZero() { } + public . GreaterThan(int expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . GreaterThanOrEqualTo(int expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . LessThan(int expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . LessThanOrEqualTo(int expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . Negative() { } + public . Positive() { } + } + [.<>(typeof(.), "HasMultipleInnerExceptions")] + [.<>(typeof(.), "HasMultipleInnerExceptions", CustomName="HasSingleInnerException", NegateLogic=true)] + [.<>(typeof(.), "HasData")] + [.<>(typeof(.), "HasData", CustomName="HasNoData", NegateLogic=true)] + [.<>(typeof(.), "HasHelpLink")] + [.<>(typeof(.), "HasHelpLink", CustomName="HasNoHelpLink", NegateLogic=true)] + [.<>(typeof(.), "HasInnerException")] + [.<>(typeof(.), "HasInnerException", CustomName="HasNoInnerException", NegateLogic=true)] + [.<>(typeof(.), "HasStackTrace")] + [.<>(typeof(.), "HasStackTrace", CustomName="HasNoStackTrace", NegateLogic=true)] + public static class ExceptionAssertionExtensions + { + public static .<> HasData(this ..IValueSource<> valueSource) { } + public static .<> HasHelpLink(this ..IValueSource<> valueSource) { } + public static .<> HasInnerException(this ..IValueSource<> valueSource) { } + public static .<> HasMultipleInnerExceptions(this ..IValueSource<> valueSource) { } + public static .<> HasNoData(this ..IValueSource<> valueSource) { } + public static .<> HasNoHelpLink(this ..IValueSource<> valueSource) { } + public static .<> HasNoInnerException(this ..IValueSource<> valueSource) { } + public static .<> HasNoStackTrace(this ..IValueSource<> valueSource) { } + public static .<> HasSingleInnerException(this ..IValueSource<> valueSource) { } + public static .<> HasStackTrace(this ..IValueSource<> valueSource) { } + } + public class ExceptionExceptionAssertionExtensionsHasDataWithExceptionAssertCondition : .<> + { + public ExceptionExceptionAssertionExtensionsHasDataWithExceptionAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ExceptionExceptionAssertionExtensionsHasHelpLinkWithExceptionAssertCondition : .<> + { + public ExceptionExceptionAssertionExtensionsHasHelpLinkWithExceptionAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ExceptionExceptionAssertionExtensionsHasInnerExceptionWithExceptionAssertCondition : .<> + { + public ExceptionExceptionAssertionExtensionsHasInnerExceptionWithExceptionAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ExceptionExceptionAssertionExtensionsHasStackTraceWithExceptionAssertCondition : .<> + { + public ExceptionExceptionAssertionExtensionsHasStackTraceWithExceptionAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.<.FileInfo>("Exists")] + [.<.FileInfo>("Exists", CustomName="DoesNotExist", NegateLogic=true)] + [.<.FileInfo>("IsReadOnly")] + [.<.FileInfo>("IsReadOnly", CustomName="IsNotReadOnly", NegateLogic=true)] + [.<.FileInfo>(typeof(.), "IsCompressed")] + [.<.FileInfo>(typeof(.), "IsCompressed", CustomName="IsNotCompressed", NegateLogic=true)] + [.<.FileInfo>(typeof(.), "IsEmpty")] + [.<.FileInfo>(typeof(.), "IsEmpty", CustomName="IsNotEmpty", NegateLogic=true)] + [.<.FileInfo>(typeof(.), "IsEncrypted")] + [.<.FileInfo>(typeof(.), "IsEncrypted", CustomName="IsNotEncrypted", NegateLogic=true)] + [.<.FileInfo>(typeof(.), "IsExecutable")] + [.<.FileInfo>(typeof(.), "IsExecutable", CustomName="IsNotExecutable", NegateLogic=true)] + [.<.FileInfo>(typeof(.), "IsHidden")] + [.<.FileInfo>(typeof(.), "IsHidden", CustomName="IsNotHidden", NegateLogic=true)] + [.<.FileInfo>(typeof(.), "IsSystem")] + [.<.FileInfo>(typeof(.), "IsSystem", CustomName="IsNotSystem", NegateLogic=true)] + public static class FileInfoAssertionExtensions + { + public static .<.FileInfo> DoesNotExist(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> Exists(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsCompressed(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsEmpty(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsEncrypted(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsExecutable(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsHidden(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsNotCompressed(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsNotEmpty(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsNotEncrypted(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsNotExecutable(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsNotHidden(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsNotReadOnly(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsNotSystem(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsReadOnly(this ..IValueSource<.FileInfo> valueSource) { } + public static .<.FileInfo> IsSystem(this ..IValueSource<.FileInfo> valueSource) { } + } + public class FileInfoExistsAssertCondition : .<.FileInfo> + { + public FileInfoExistsAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.FileInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class FileInfoFileInfoAssertionExtensionsIsCompressedWithFileInfoAssertCondition : .<.FileInfo> + { + public FileInfoFileInfoAssertionExtensionsIsCompressedWithFileInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.FileInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class FileInfoFileInfoAssertionExtensionsIsEmptyWithFileInfoAssertCondition : .<.FileInfo> + { + public FileInfoFileInfoAssertionExtensionsIsEmptyWithFileInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.FileInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class FileInfoFileInfoAssertionExtensionsIsEncryptedWithFileInfoAssertCondition : .<.FileInfo> + { + public FileInfoFileInfoAssertionExtensionsIsEncryptedWithFileInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.FileInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class FileInfoFileInfoAssertionExtensionsIsExecutableWithFileInfoAssertCondition : .<.FileInfo> + { + public FileInfoFileInfoAssertionExtensionsIsExecutableWithFileInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.FileInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class FileInfoFileInfoAssertionExtensionsIsHiddenWithFileInfoAssertCondition : .<.FileInfo> + { + public FileInfoFileInfoAssertionExtensionsIsHiddenWithFileInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.FileInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class FileInfoFileInfoAssertionExtensionsIsSystemWithFileInfoAssertCondition : .<.FileInfo> + { + public FileInfoFileInfoAssertionExtensionsIsSystemWithFileInfoAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.FileInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class FileInfoIsReadOnlyAssertCondition : .<.FileInfo> + { + public FileInfoIsReadOnlyAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.FileInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.<.FileSystemInfo>("Exists")] + [.<.FileSystemInfo>("Exists", CustomName="DoesNotExist", NegateLogic=true)] + public static class FileSystemAssertionExtensions + { + public static .<.FileSystemInfo> DoesNotExist(this ..IValueSource<.FileSystemInfo> valueSource) { } + public static .<.FileSystemInfo> Exists(this ..IValueSource<.FileSystemInfo> valueSource) { } + } + public class FileSystemInfoExistsAssertCondition : .<.FileSystemInfo> + { + public FileSystemInfoExistsAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.FileSystemInfo? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public static class GenericIsExtensions + { + public static . IsAssignableFrom(this ..IValueSource valueSource, type) { } + public static . IsAssignableFrom(this ..IValueSource valueSource) { } + public static . IsAssignableTo(this ..IValueSource valueSource, type) { } + public static . IsAssignableTo(this ..IValueSource valueSource) { } + public static ..GenericEqualToAssertionBuilderWrapper IsEqualTo(this ..IValueSource valueSource, TActual expected, [.("expected")] string doNotPopulateThisValue1 = null) { } + public static ..GenericEqualToAssertionBuilderWrapper IsEqualTo(this ..IValueSource valueSource, TActual expected, . equalityComparer, [.("expected")] string doNotPopulateThisValue1 = null) { } + public static . IsEquatableOrEqualTo(this ..IValueSource valueSource, TActual expected, [.("expected")] string doNotPopulateThisValue1 = null) { } + public static ..EquivalentToAssertionBuilderWrapper IsEquivalentTo(this ..IValueSource valueSource, TExpected expected, [.("expected")] string doNotPopulateThisValue1 = null) { } + public static . IsNotAssignableFrom(this ..IValueSource valueSource, type) { } + public static . IsNotAssignableFrom(this ..IValueSource valueSource) { } + public static . IsNotAssignableTo(this ..IValueSource valueSource, type) { } + public static . IsNotAssignableTo(this ..IValueSource valueSource) { } + public static . IsNotTypeOf(this ..IValueSource valueSource, type) { } + public static . IsNotTypeOf(this ..IValueSource valueSource) { } + public static . IsNull(this ..IValueSource valueSource) { } + public static . IsSameReferenceAs(this ..IValueSource valueSource, TExpected expected, [.("expected")] string doNotPopulateThisValue1 = null) { } + public static . IsTypeOf(this ..IValueSource valueSource, type) { } + public static . IsTypeOf(this ..IValueSource valueSource) { } + } + public static class GenericIsInExtensions + { + public static . IsIn(this ..IValueSource valueSource, . expected) { } + public static . IsIn(this ..IValueSource valueSource, params TActual[] expected) { } + public static . IsIn(this ..IValueSource valueSource, . expected, . equalityComparer) { } + } + public static class GenericIsNotExtensions + { + public static . IsDefault(this ..IValueSource valueSource) { } + public static . IsNotDefault(this ..IValueSource valueSource) { } + public static ..GenericNotEqualToAssertionBuilderWrapper IsNotEqualTo(this ..IValueSource valueSource, TActual expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public static . IsNotEquatableOrEqualTo(this ..IValueSource valueSource, TActual expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public static ..NotEquivalentToAssertionBuilderWrapper IsNotEquivalentTo(this ..IValueSource valueSource, TExpected expected, [.("expected")] string? doNotPopulateThisValue1 = null) { } + public static ..NotNullAssertionBuilderWrapper IsNotNull(this ..IValueSource valueSource) + where TActual : class { } + public static ..NotNullStructAssertionBuilderWrapper IsNotNull(this ..IValueSource valueSource) + where TActual : struct { } + public static . IsNotSameReferenceAs(this ..IValueSource valueSource, TExpected expected, [.("expected")] string? doNotPopulateThisValue1 = null) { } + } + public static class GenericSatisfiesExtensions + { + public static .CollectionWrapper All(this ..IValueSource<.> valueSource) { } + public static . Satisfies(this ..IValueSource valueSource, ?> asyncMapper, <..IValueSource, .> assert, [.("asyncMapper")] string mapperExpression = "", [.("assert")] string assertionBuilderExpression = "") { } + public static . Satisfies(this ..IValueSource valueSource, mapper, <..IValueSource, .> assert, [.("mapper")] string mapperExpression = "", [.("assert")] string assertionBuilderExpression = "") { } + } + [.<>(typeof(.), "IsEmpty")] + [.<>(typeof(.), "IsEmpty", CustomName="IsNotEmpty", NegateLogic=true)] + [.(typeof(.), "IsNullOrEmpty")] + [.(typeof(.), "IsNullOrEmpty", CustomName="IsNotNullOrEmpty", NegateLogic=true)] + public static class GuidAssertionExtensions + { + public static .<> IsEmpty(this ..IValueSource<> valueSource) { } + public static .<> IsNotEmpty(this ..IValueSource<> valueSource) { } + public static . IsNotNullOrEmpty(this ..IValueSource valueSource) { } + public static . IsNullOrEmpty(this ..IValueSource valueSource) { } + } + public class GuidGuidAssertionExtensionsIsEmptyWithGuidAssertCondition : .<> + { + public GuidGuidAssertionExtensionsIsEmptyWithGuidAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public static class HasExtensions + { + public static .<., TInner> HasCount(this ..IValueSource<.> valueSource) { } + public static .<., TInner> HasCount(this ..IValueSource<.> valueSource) { } + public static .<.> HasCount(this ..IValueSource<.> valueSource, int count) { } + public static .<.> HasDistinctItems(this ..IValueSource<.> valueSource) { } + public static .<.> HasDistinctItems(this ..IValueSource<.> valueSource) { } + public static .<.> HasDistinctItems(this ..IValueSource<.> valueSource, . equalityComparer) { } + public static .<.> HasDistinctItems(this ..IValueSource<.> valueSource, . equalityComparer) { } + public static . HasLength(this ..IValueSource valueSource) { } + public static ..Member HasMember(this ..IValueSource valueSource, .<> selector, [.("selector")] string expression = "") { } + public static . HasMessageContaining(this ..IValueSource valueSource, string expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : { } + public static . HasMessageContaining(this ..IValueSource valueSource, string expected, stringComparison, [.("expected")] string doNotPopulateThisValue1 = null, [.("stringComparison")] string doNotPopulateThisValue2 = null) + where TActual : { } + public static . HasMessageEndingWith(this ..IValueSource valueSource, string expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : { } + public static . HasMessageEndingWith(this ..IValueSource valueSource, string expected, stringComparison, [.("expected")] string doNotPopulateThisValue1 = null, [.("stringComparison")] string doNotPopulateThisValue2 = null) + where TActual : { } + public static . HasMessageEqualTo(this ..IValueSource valueSource, string expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : { } + public static . HasMessageEqualTo(this ..IValueSource valueSource, string expected, stringComparison, [.("expected")] string doNotPopulateThisValue1 = null, [.("stringComparison")] string doNotPopulateThisValue2 = null) + where TActual : { } + public static . HasMessageMatching(this ..IValueSource valueSource, . expected, stringComparison, [.("expected")] string doNotPopulateThisValue1 = null, [.("stringComparison")] string doNotPopulateThisValue2 = null) + where TActual : { } + public static . HasMessageStartingWith(this ..IValueSource valueSource, string expected, [.("expected")] string doNotPopulateThisValue = null) + where TActual : { } + public static . HasMessageStartingWith(this ..IValueSource valueSource, string expected, stringComparison, [.("expected")] string doNotPopulateThisValue1 = null, [.("stringComparison")] string doNotPopulateThisValue2 = null) + where TActual : { } + public static ..SingleItemAssertionBuilderWrapper<., TInner> HasSingleItem(this ..IValueSource<.> valueSource) { } + public static ..SingleItemAssertionBuilderWrapper<., TInner> HasSingleItem(this ..IValueSource<.> valueSource) { } + } + [.<.HttpStatusCode>(typeof(.), "IsClientError")] + [.<.HttpStatusCode>(typeof(.), "IsClientError", CustomName="IsNotClientError", NegateLogic=true)] + [.<.HttpStatusCode>(typeof(.), "IsError")] + [.<.HttpStatusCode>(typeof(.), "IsError", CustomName="IsNotError", NegateLogic=true)] + [.<.HttpStatusCode>(typeof(.), "IsInformational")] + [.<.HttpStatusCode>(typeof(.), "IsInformational", CustomName="IsNotInformational", NegateLogic=true)] + [.<.HttpStatusCode>(typeof(.), "IsRedirection")] + [.<.HttpStatusCode>(typeof(.), "IsRedirection", CustomName="IsNotRedirection", NegateLogic=true)] + [.<.HttpStatusCode>(typeof(.), "IsServerError")] + [.<.HttpStatusCode>(typeof(.), "IsServerError", CustomName="IsNotServerError", NegateLogic=true)] + [.<.HttpStatusCode>(typeof(.), "IsSuccess")] + [.<.HttpStatusCode>(typeof(.), "IsSuccess", CustomName="IsNotSuccess", NegateLogic=true)] + public static class HttpStatusCodeAssertionExtensions + { + public static .<.HttpStatusCode> IsClientError(this ..IValueSource<.HttpStatusCode> valueSource) { } + public static .<.HttpStatusCode> IsError(this ..IValueSource<.HttpStatusCode> valueSource) { } + public static .<.HttpStatusCode> IsInformational(this ..IValueSource<.HttpStatusCode> valueSource) { } + public static .<.HttpStatusCode> IsNotClientError(this ..IValueSource<.HttpStatusCode> valueSource) { } + public static .<.HttpStatusCode> IsNotError(this ..IValueSource<.HttpStatusCode> valueSource) { } + public static .<.HttpStatusCode> IsNotInformational(this ..IValueSource<.HttpStatusCode> valueSource) { } + public static .<.HttpStatusCode> IsNotRedirection(this ..IValueSource<.HttpStatusCode> valueSource) { } + public static .<.HttpStatusCode> IsNotServerError(this ..IValueSource<.HttpStatusCode> valueSource) { } + public static .<.HttpStatusCode> IsNotSuccess(this ..IValueSource<.HttpStatusCode> valueSource) { } + public static .<.HttpStatusCode> IsRedirection(this ..IValueSource<.HttpStatusCode> valueSource) { } + public static .<.HttpStatusCode> IsServerError(this ..IValueSource<.HttpStatusCode> valueSource) { } + public static .<.HttpStatusCode> IsSuccess(this ..IValueSource<.HttpStatusCode> valueSource) { } + } + public class HttpStatusCodeHttpStatusCodeAssertionExtensionsIsClientErrorWithHttpStatusCodeAssertCondition : .<.HttpStatusCode> + { + public HttpStatusCodeHttpStatusCodeAssertionExtensionsIsClientErrorWithHttpStatusCodeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.HttpStatusCode actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class HttpStatusCodeHttpStatusCodeAssertionExtensionsIsErrorWithHttpStatusCodeAssertCondition : .<.HttpStatusCode> + { + public HttpStatusCodeHttpStatusCodeAssertionExtensionsIsErrorWithHttpStatusCodeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.HttpStatusCode actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class HttpStatusCodeHttpStatusCodeAssertionExtensionsIsInformationalWithHttpStatusCodeAssertCondition : .<.HttpStatusCode> + { + public HttpStatusCodeHttpStatusCodeAssertionExtensionsIsInformationalWithHttpStatusCodeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.HttpStatusCode actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class HttpStatusCodeHttpStatusCodeAssertionExtensionsIsRedirectionWithHttpStatusCodeAssertCondition : .<.HttpStatusCode> + { + public HttpStatusCodeHttpStatusCodeAssertionExtensionsIsRedirectionWithHttpStatusCodeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.HttpStatusCode actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class HttpStatusCodeHttpStatusCodeAssertionExtensionsIsServerErrorWithHttpStatusCodeAssertCondition : .<.HttpStatusCode> + { + public HttpStatusCodeHttpStatusCodeAssertionExtensionsIsServerErrorWithHttpStatusCodeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.HttpStatusCode actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class HttpStatusCodeHttpStatusCodeAssertionExtensionsIsSuccessWithHttpStatusCodeAssertCondition : .<.HttpStatusCode> + { + public HttpStatusCodeHttpStatusCodeAssertionExtensionsIsSuccessWithHttpStatusCodeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.HttpStatusCode actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.<.IPAddress>("IsIPv4MappedToIPv6")] + [.<.IPAddress>("IsIPv4MappedToIPv6", CustomName="IsNotIPv4MappedToIPv6", NegateLogic=true)] + [.<.IPAddress>("IsIPv6LinkLocal")] + [.<.IPAddress>("IsIPv6LinkLocal", CustomName="IsNotIPv6LinkLocal", NegateLogic=true)] + [.<.IPAddress>("IsIPv6Multicast")] + [.<.IPAddress>("IsIPv6Multicast", CustomName="IsNotIPv6Multicast", NegateLogic=true)] + [.<.IPAddress>("IsIPv6SiteLocal")] + [.<.IPAddress>("IsIPv6SiteLocal", CustomName="IsNotIPv6SiteLocal", NegateLogic=true)] + [.<.IPAddress>(typeof(.), "IsIPv4")] + [.<.IPAddress>(typeof(.), "IsIPv4", CustomName="IsNotIPv4", NegateLogic=true)] + [.<.IPAddress>(typeof(.), "IsIPv6")] + [.<.IPAddress>(typeof(.), "IsIPv6", CustomName="IsNotIPv6", NegateLogic=true)] + [.<.IPAddress>(typeof(.), "IsLoopback")] + [.<.IPAddress>(typeof(.), "IsLoopback", CustomName="IsNotLoopback", NegateLogic=true)] + [.<.IPAddress>(typeof(.), "IsPrivate")] + [.<.IPAddress>(typeof(.), "IsPrivate", CustomName="IsPublic", NegateLogic=true)] + public static class IPAddressAssertionExtensions + { + public static .<.IPAddress> IsIPv4(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsIPv4MappedToIPv6(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsIPv6(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsIPv6LinkLocal(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsIPv6Multicast(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsIPv6SiteLocal(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsLoopback(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsNotIPv4(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsNotIPv4MappedToIPv6(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsNotIPv6(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsNotIPv6LinkLocal(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsNotIPv6Multicast(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsNotIPv6SiteLocal(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsNotLoopback(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsPrivate(this ..IValueSource<.IPAddress> valueSource) { } + public static .<.IPAddress> IsPublic(this ..IValueSource<.IPAddress> valueSource) { } + } + public class IPAddressIPAddressAssertionExtensionsIsIPv4WithIPAddressAssertCondition : .<.IPAddress> + { + public IPAddressIPAddressAssertionExtensionsIsIPv4WithIPAddressAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.IPAddress? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class IPAddressIPAddressAssertionExtensionsIsIPv6WithIPAddressAssertCondition : .<.IPAddress> + { + public IPAddressIPAddressAssertionExtensionsIsIPv6WithIPAddressAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.IPAddress? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class IPAddressIPAddressAssertionExtensionsIsLoopbackWithIPAddressAssertCondition : .<.IPAddress> + { + public IPAddressIPAddressAssertionExtensionsIsLoopbackWithIPAddressAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.IPAddress? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class IPAddressIPAddressAssertionExtensionsIsPrivateWithIPAddressAssertCondition : .<.IPAddress> + { + public IPAddressIPAddressAssertionExtensionsIsPrivateWithIPAddressAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.IPAddress? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class IPAddressIsIPv4MappedToIPv6AssertCondition : .<.IPAddress> + { + public IPAddressIsIPv4MappedToIPv6AssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.IPAddress? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class IPAddressIsIPv6LinkLocalAssertCondition : .<.IPAddress> + { + public IPAddressIsIPv6LinkLocalAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.IPAddress? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class IPAddressIsIPv6MulticastAssertCondition : .<.IPAddress> + { + public IPAddressIsIPv6MulticastAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.IPAddress? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class IPAddressIsIPv6SiteLocalAssertCondition : .<.IPAddress> + { + public IPAddressIsIPv6SiteLocalAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.IPAddress? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public static class ImmutableArrayIsExtensions + { + public static .<.> IsEmpty(this ..IValueSource<.> valueSource) { } + public static .<.> IsEquivalentTo(this ..IValueSource<.> valueSource, . expected, [.("expected")] string doNotPopulateThisValue = null) { } + public static .<.> IsEquivalentTo(this ..IValueSource<.> valueSource, . expected, . comparer, [.("expected")] string doNotPopulateThisValue = null) { } + public static .<.> IsEquivalentTo(this ..IValueSource<.> valueSource, . expected, . collectionOrdering, [.("expected")] string doNotPopulateThisValue = null) { } + public static .<.> IsEquivalentTo(this ..IValueSource<.> valueSource, . expected, . comparer, . collectionOrdering, [.("expected")] string doNotPopulateThisValue = null) { } + public static .<.> IsInDescendingOrder(this ..IValueSource<.> valueSource) { } + public static .<.> IsInDescendingOrder(this ..IValueSource<.> valueSource, . comparer) { } + public static .<.> IsInOrder(this ..IValueSource<.> valueSource) { } + public static .<.> IsInOrder(this ..IValueSource<.> valueSource, . comparer) { } + public static .<.> IsOrderedBy(this ..IValueSource<.> valueSource, comparisonItemSelector, [.("comparisonItemSelector")] string doNotPopulateThisValue = null) { } + public static .<.> IsOrderedBy(this ..IValueSource<.> valueSource, comparisonItemSelector, . comparer, [.("comparisonItemSelector")] string doNotPopulateThisValue = null, [.("comparer")] string doNotPopulateThisValue2 = null) { } + public static .<.> IsOrderedByDescending(this ..IValueSource<.> valueSource, comparisonItemSelector, [.("comparisonItemSelector")] string doNotPopulateThisValue = null) { } + public static .<.> IsOrderedByDescending(this ..IValueSource<.> valueSource, comparisonItemSelector, . comparer, [.("comparisonItemSelector")] string doNotPopulateThisValue = null, [.("comparer")] string doNotPopulateThisValue2 = null) { } + } + public static class ImmutableArrayIsNotExtensions + { + public static .<.> IsNotEmpty(this ..IValueSource<.> valueSource) { } + public static .<.> IsNotEquivalentTo(this ..IValueSource<.> valueSource, . expected, [.("expected")] string doNotPopulateThisValue = null) { } + public static .<.> IsNotEquivalentTo(this ..IValueSource<.> valueSource, . expected, . comparer, [.("expected")] string doNotPopulateThisValue = null, [.("comparer")] string doNotPopulateThisValue2 = null) { } + public static .<.> IsNotEquivalentTo(this ..IValueSource<.> valueSource, . expected, . collectionOrdering, [.("expected")] string doNotPopulateThisValue = null, [.("collectionOrdering")] string doNotPopulateThisValue2 = null) { } + public static .<.> IsNotEquivalentTo(this ..IValueSource<.> valueSource, . expected, . comparer, . collectionOrdering, [.("expected")] string doNotPopulateThisValue = null, [.("collectionOrdering")] string doNotPopulateThisValue2 = null) { } + } + public class NullableGuidAssertionExtensionsIsNullOrEmptyWithNullableAssertCondition : . + { + public NullableGuidAssertionExtensionsIsNullOrEmptyWithNullableAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.(typeof(.Path), "IsPathRooted", CustomName="IsNotRootedPath", NegateLogic=true)] + [.(typeof(.Path), "IsPathRooted", CustomName="IsRootedPath")] + public static class PathAssertionExtensions + { + public static . IsNotRootedPath(this ..IValueSource valueSource) { } + public static . IsRootedPath(this ..IValueSource valueSource) { } + } + [.<.>(typeof(.), "HasTimeout")] + [.<.>(typeof(.), "HasTimeout", CustomName="HasNoTimeout", NegateLogic=true)] + [.<.>(typeof(.), "IsCaseInsensitive")] + [.<.>(typeof(.), "IsCaseInsensitive", CustomName="IsCaseSensitive", NegateLogic=true)] + [.<.>(typeof(.), "IsCompiled")] + [.<.>(typeof(.), "IsCompiled", CustomName="IsNotCompiled", NegateLogic=true)] + [.<.>(typeof(.), "IsMultiline")] + [.<.>(typeof(.), "IsMultiline", CustomName="IsSingleline", NegateLogic=true)] + public static class RegexAssertionExtensions + { + public static .<.> HasNoTimeout(this ..IValueSource<.> valueSource) { } + public static .<.> HasTimeout(this ..IValueSource<.> valueSource) { } + public static .<.> IsCaseInsensitive(this ..IValueSource<.> valueSource) { } + public static .<.> IsCaseSensitive(this ..IValueSource<.> valueSource) { } + public static .<.> IsCompiled(this ..IValueSource<.> valueSource) { } + public static .<.> IsMultiline(this ..IValueSource<.> valueSource) { } + public static .<.> IsNotCompiled(this ..IValueSource<.> valueSource) { } + public static .<.> IsSingleline(this ..IValueSource<.> valueSource) { } + } + public class RegexRegexAssertionExtensionsHasTimeoutWithRegexAssertCondition : .<.> + { + public RegexRegexAssertionExtensionsHasTimeoutWithRegexAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class RegexRegexAssertionExtensionsIsCaseInsensitiveWithRegexAssertCondition : .<.> + { + public RegexRegexAssertionExtensionsIsCaseInsensitiveWithRegexAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class RegexRegexAssertionExtensionsIsCompiledWithRegexAssertCondition : .<.> + { + public RegexRegexAssertionExtensionsIsCompiledWithRegexAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class RegexRegexAssertionExtensionsIsMultilineWithRegexAssertCondition : .<.> + { + public RegexRegexAssertionExtensionsIsMultilineWithRegexAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public static class SourceExtensions + { + public static . RegisterAssertion(this ..IDelegateSource delegateSource, . assertCondition, string?[] argumentExpressions, [.] string? caller = null) { } + public static . RegisterAssertion(this ..IValueSource source, . assertCondition, string?[] argumentExpressions, [.] string? caller = null) { } + public static . RegisterConversionAssertion(this ..IDelegateSource source) + where TToType : { } + public static . RegisterConversionAssertion(this ..IValueSource source, . assertCondition, string?[] argumentExpressions, [.] string? caller = null) { } + } + [.<.Stream>("CanRead")] + [.<.Stream>("CanRead", CustomName="CannotRead", NegateLogic=true)] + [.<.Stream>("CanSeek")] + [.<.Stream>("CanSeek", CustomName="CannotSeek", NegateLogic=true)] + [.<.Stream>("CanWrite")] + [.<.Stream>("CanWrite", CustomName="CannotWrite", NegateLogic=true)] + [.<.Stream>(typeof(.), "IsAtEnd")] + [.<.Stream>(typeof(.), "IsAtEnd", CustomName="IsNotAtEnd", NegateLogic=true)] + [.<.Stream>(typeof(.), "IsAtStart")] + [.<.Stream>(typeof(.), "IsAtStart", CustomName="IsNotAtStart", NegateLogic=true)] + [.<.Stream>(typeof(.), "IsEmpty")] + [.<.Stream>(typeof(.), "IsEmpty", CustomName="IsNotEmpty", NegateLogic=true)] + public static class StreamAssertionExtensions + { + public static .<.Stream> CanRead(this ..IValueSource<.Stream> valueSource) { } + public static .<.Stream> CanSeek(this ..IValueSource<.Stream> valueSource) { } + public static .<.Stream> CanWrite(this ..IValueSource<.Stream> valueSource) { } + public static .<.Stream> CannotRead(this ..IValueSource<.Stream> valueSource) { } + public static .<.Stream> CannotSeek(this ..IValueSource<.Stream> valueSource) { } + public static .<.Stream> CannotWrite(this ..IValueSource<.Stream> valueSource) { } + public static .<.Stream> IsAtEnd(this ..IValueSource<.Stream> valueSource) { } + public static .<.Stream> IsAtStart(this ..IValueSource<.Stream> valueSource) { } + public static .<.Stream> IsEmpty(this ..IValueSource<.Stream> valueSource) { } + public static .<.Stream> IsNotAtEnd(this ..IValueSource<.Stream> valueSource) { } + public static .<.Stream> IsNotAtStart(this ..IValueSource<.Stream> valueSource) { } + public static .<.Stream> IsNotEmpty(this ..IValueSource<.Stream> valueSource) { } + } + public class StreamCanReadAssertCondition : .<.Stream> + { + public StreamCanReadAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Stream? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StreamCanSeekAssertCondition : .<.Stream> + { + public StreamCanSeekAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Stream? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StreamCanWriteAssertCondition : .<.Stream> + { + public StreamCanWriteAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Stream? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StreamStreamAssertionExtensionsIsAtEndWithStreamAssertCondition : .<.Stream> + { + public StreamStreamAssertionExtensionsIsAtEndWithStreamAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Stream? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StreamStreamAssertionExtensionsIsAtStartWithStreamAssertCondition : .<.Stream> + { + public StreamStreamAssertionExtensionsIsAtStartWithStreamAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Stream? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StreamStreamAssertionExtensionsIsEmptyWithStreamAssertCondition : .<.Stream> + { + public StreamStreamAssertionExtensionsIsEmptyWithStreamAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.Stream? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.("Contains", CustomName="DoesNotContain", NegateLogic=true)] + [.("EndsWith", CustomName="DoesNotEndWith", NegateLogic=true)] + [.("EndsWith", CustomName="EndsWith")] + [.("StartsWith", CustomName="DoesNotStartWith", NegateLogic=true)] + [.("StartsWith", CustomName="StartsWith")] + public static class StringAssertionExtensions + { + public static . DoesNotContain(this ..IValueSource valueSource, string value, [.("value")] string? doNotPopulateThisValue1 = null) { } + public static . DoesNotEndWith(this ..IValueSource valueSource, string value, [.("value")] string? doNotPopulateThisValue1 = null) { } + public static . DoesNotEndWith(this ..IValueSource valueSource, string value, comparisonType, [.("value")] string? doNotPopulateThisValue1 = null, [.("comparisonType")] string? doNotPopulateThisValue2 = null) { } + public static . DoesNotEndWith(this ..IValueSource valueSource, string value, bool ignoreCase, .CultureInfo culture, [.("value")] string? doNotPopulateThisValue1 = null, [.("ignoreCase")] string? doNotPopulateThisValue2 = null, [.("culture")] string? doNotPopulateThisValue3 = null) { } + public static . DoesNotStartWith(this ..IValueSource valueSource, string value, [.("value")] string? doNotPopulateThisValue1 = null) { } + public static . DoesNotStartWith(this ..IValueSource valueSource, string value, comparisonType, [.("value")] string? doNotPopulateThisValue1 = null, [.("comparisonType")] string? doNotPopulateThisValue2 = null) { } + public static . DoesNotStartWith(this ..IValueSource valueSource, string value, bool ignoreCase, .CultureInfo culture, [.("value")] string? doNotPopulateThisValue1 = null, [.("ignoreCase")] string? doNotPopulateThisValue2 = null, [.("culture")] string? doNotPopulateThisValue3 = null) { } + public static . EndsWith(this ..IValueSource valueSource, string value, [.("value")] string? doNotPopulateThisValue1 = null) { } + public static . EndsWith(this ..IValueSource valueSource, string value, comparisonType, [.("value")] string? doNotPopulateThisValue1 = null, [.("comparisonType")] string? doNotPopulateThisValue2 = null) { } + public static . EndsWith(this ..IValueSource valueSource, string value, bool ignoreCase, .CultureInfo culture, [.("value")] string? doNotPopulateThisValue1 = null, [.("ignoreCase")] string? doNotPopulateThisValue2 = null, [.("culture")] string? doNotPopulateThisValue3 = null) { } + public static . StartsWith(this ..IValueSource valueSource, string value, [.("value")] string? doNotPopulateThisValue1 = null) { } + public static . StartsWith(this ..IValueSource valueSource, string value, comparisonType, [.("value")] string? doNotPopulateThisValue1 = null, [.("comparisonType")] string? doNotPopulateThisValue2 = null) { } + public static . StartsWith(this ..IValueSource valueSource, string value, bool ignoreCase, .CultureInfo culture, [.("value")] string? doNotPopulateThisValue1 = null, [.("ignoreCase")] string? doNotPopulateThisValue2 = null, [.("culture")] string? doNotPopulateThisValue3 = null) { } + } + [.<.StringBuilder>(typeof(.), "HasExcessCapacity")] + [.<.StringBuilder>(typeof(.), "HasExcessCapacity", CustomName="HasNoExcessCapacity", NegateLogic=true)] + [.<.StringBuilder>(typeof(.), "IsAtCapacity")] + [.<.StringBuilder>(typeof(.), "IsAtCapacity", CustomName="IsNotAtCapacity", NegateLogic=true)] + [.<.StringBuilder>(typeof(.), "IsEmpty")] + [.<.StringBuilder>(typeof(.), "IsEmpty", CustomName="IsNotEmpty", NegateLogic=true)] + public static class StringBuilderAssertionExtensions + { + public static .<.StringBuilder> HasExcessCapacity(this ..IValueSource<.StringBuilder> valueSource) { } + public static .<.StringBuilder> HasNoExcessCapacity(this ..IValueSource<.StringBuilder> valueSource) { } + public static .<.StringBuilder> IsAtCapacity(this ..IValueSource<.StringBuilder> valueSource) { } + public static .<.StringBuilder> IsEmpty(this ..IValueSource<.StringBuilder> valueSource) { } + public static .<.StringBuilder> IsNotAtCapacity(this ..IValueSource<.StringBuilder> valueSource) { } + public static .<.StringBuilder> IsNotEmpty(this ..IValueSource<.StringBuilder> valueSource) { } + } + public class StringBuilderStringBuilderAssertionExtensionsHasExcessCapacityWithStringBuilderAssertCondition : .<.StringBuilder> + { + public StringBuilderStringBuilderAssertionExtensionsHasExcessCapacityWithStringBuilderAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.StringBuilder? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StringBuilderStringBuilderAssertionExtensionsIsAtCapacityWithStringBuilderAssertCondition : .<.StringBuilder> + { + public StringBuilderStringBuilderAssertionExtensionsIsAtCapacityWithStringBuilderAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.StringBuilder? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StringBuilderStringBuilderAssertionExtensionsIsEmptyWithStringBuilderAssertCondition : .<.StringBuilder> + { + public StringBuilderStringBuilderAssertionExtensionsIsEmptyWithStringBuilderAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.StringBuilder? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StringContainsWithStringAssertCondition : . + { + public StringContainsWithStringAssertCondition(string value, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StringEndsWithWithStringAnd1MoreAssertCondition : . + { + public StringEndsWithWithStringAnd1MoreAssertCondition(string value, comparisonType, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StringEndsWithWithStringAnd2MoreAssertCondition : . + { + public StringEndsWithWithStringAnd2MoreAssertCondition(string value, bool ignoreCase, .CultureInfo culture, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StringEndsWithWithStringAssertCondition : . + { + public StringEndsWithWithStringAssertCondition(string value, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public static class StringExtensions + { + public static string GetStringOr(this string? value, string defaultValue) { } + public static string GetStringOrEmpty(this string? value) { } + public static string PrependAOrAn(this string value) { } + public static string ReplaceNewLines(this string value) { } + public static string ShowNewLines(this string value) { } + public static string TruncateWithEllipsis(this string value, int maxLength) { } + } + public static class StringIsExtensions + { + public static . IsEmpty(this ..IValueSource valueSource) { } + public static ..StringEqualToAssertionBuilderWrapper IsEqualTo(this ..IValueSource valueSource, string expected, [.("expected")] string doNotPopulateThisValue1 = null) { } + public static ..StringEqualToAssertionBuilderWrapper IsEqualTo(this ..IValueSource valueSource, string expected, stringComparison, [.("expected")] string doNotPopulateThisValue1 = null, [.("stringComparison")] string doNotPopulateThisValue2 = null) { } + public static . IsNullOrEmpty(this ..IValueSource valueSource) { } + public static . IsNullOrWhitespace(this ..IValueSource valueSource) { } + } + public static class StringIsNotExtensions + { + public static . IsNotEmpty(this ..IValueSource valueSource) { } + public static . IsNotEqualTo(this ..IValueSource valueSource, string expected, [.("expected")] string doNotPopulateThisValue = null) { } + public static . IsNotEqualTo(this ..IValueSource valueSource, string expected, stringComparison, [.("expected")] string doNotPopulateThisValue1 = null, [.("stringComparison")] string doNotPopulateThisValue2 = null) { } + public static . IsNotNullOrEmpty(this ..IValueSource valueSource) { } + public static . IsNotNullOrWhitespace(this ..IValueSource valueSource) { } + } + public class StringLength + { + public StringLength(..IValueSource valueSource) { } + public . Positive { get; } + public . Zero { get; } + public . EqualTo(int expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . GreaterThan(int expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . GreaterThanOrEqualTo(int expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . LessThan(int expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . LessThanOrEqualTo(int expected, [.("expected")] string? doNotPopulateThisValue = null) { } + } + public class StringPathIsPathRootedWithStringAssertCondition : . + { + public StringPathIsPathRootedWithStringAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StringStartsWithWithStringAnd1MoreAssertCondition : . + { + public StringStartsWithWithStringAnd1MoreAssertCondition(string value, comparisonType, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StringStartsWithWithStringAnd2MoreAssertCondition : . + { + public StringStartsWithWithStringAnd2MoreAssertCondition(string value, bool ignoreCase, .CultureInfo culture, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StringStartsWithWithStringAssertCondition : . + { + public StringStartsWithWithStringAssertCondition(string value, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StringUriIsHexEncodingWithStringAnd1MoreAssertCondition : . + { + public StringUriIsHexEncodingWithStringAnd1MoreAssertCondition(int index, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class StringUriIsWellFormedUriStringWithStringAnd1MoreAssertCondition : . + { + public StringUriIsWellFormedUriStringWithStringAnd1MoreAssertCondition( uriKind, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(string? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.<.>("IsCanceled")] + [.<.>("IsCanceled", CustomName="IsNotCanceled", NegateLogic=true)] + [.<.>("IsCompleted")] + [.<.>("IsCompleted", CustomName="IsNotCompleted", NegateLogic=true)] + [.<.>("IsFaulted")] + [.<.>("IsFaulted", CustomName="IsNotFaulted", NegateLogic=true)] + public static class TaskAssertionExtensions + { + public static .<.> IsCanceled(this ..IValueSource<.> valueSource) { } + public static .<.> IsCompleted(this ..IValueSource<.> valueSource) { } + public static .<.> IsFaulted(this ..IValueSource<.> valueSource) { } + public static .<.> IsNotCanceled(this ..IValueSource<.> valueSource) { } + public static .<.> IsNotCompleted(this ..IValueSource<.> valueSource) { } + public static .<.> IsNotFaulted(this ..IValueSource<.> valueSource) { } + } + public class TaskIsCanceledAssertCondition : .<.> + { + public TaskIsCanceledAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TaskIsCompletedAssertCondition : .<.> + { + public TaskIsCompletedAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TaskIsFaultedAssertCondition : .<.> + { + public TaskIsFaultedAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(.? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class ThrowsException + where TException : + { + public ThrowsException(. delegateAssertionBuilder, ..IDelegateSource source, selector) { } + public ..ValueAnd And { get; } + public ..DelegateOr Or { get; } + public . GetAwaiter() { } + public . WithInnerException() { } + public . WithMessage(string expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . WithMessageContaining(string expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . WithMessageContaining(string expected, stringComparison, [.("expected")] string? doNotPopulateThisValue = null, [.("stringComparison")] string? doNotPopulateThisValue2 = null) { } + public . WithMessageMatching(. match, [.("match")] string? doNotPopulateThisValue = null) { } + public . WithMessageNotContaining(string expected, [.("expected")] string? doNotPopulateThisValue = null) { } + public . WithMessageNotContaining(string expected, stringComparison, [.("expected")] string? doNotPopulateThisValue = null, [.("stringComparison")] string? doNotPopulateThisValue2 = null) { } + public static . op_Explicit(. throwsException) { } + } + public static class ThrowsExtensions + { + public static . Throws(this ..IDelegateSource delegateSource, type, [.("type")] string? doNotPopulateThisValue = null) { } + public static . Throws(this ..IDelegateSource delegateSource) + where TException : { } + public static . ThrowsExactly(this ..IDelegateSource delegateSource) + where TException : { } + public static . ThrowsException(this ..IDelegateSource delegateSource) { } + public static . ThrowsNothing(this ..IDelegateSource delegateSource) { } + public static . ThrowsNothing(this ..IValueDelegateSource delegateSource) { } + public static . ThrowsWithin(this ..IDelegateSource delegateSource, timeSpan, [.("timeSpan")] string? doNotPopulateThisValue = null) { } + public static . ThrowsWithin(this ..IDelegateSource delegateSource, timeSpan, [.("timeSpan")] string? doNotPopulateThisValue = null) + where TException : { } + public static . WithParameterName(this . throwsException, string expected, [.("expected")] string? doNotPopulateThisValue = null) + where TException : { } + } + [.<>(typeof(.), "IsNegative")] + [.<>(typeof(.), "IsNegative", CustomName="IsPositiveOrZero", NegateLogic=true)] + [.<>(typeof(.), "IsPositive")] + [.<>(typeof(.), "IsPositive", CustomName="IsNegativeOrZero", NegateLogic=true)] + [.<>(typeof(.), "IsZero")] + [.<>(typeof(.), "IsZero", CustomName="IsNotZero", NegateLogic=true)] + public static class TimeSpanAssertionExtensions + { + public static .<> IsNegative(this ..IValueSource<> valueSource) { } + public static .<> IsNegativeOrZero(this ..IValueSource<> valueSource) { } + public static .<> IsNotZero(this ..IValueSource<> valueSource) { } + public static .<> IsPositive(this ..IValueSource<> valueSource) { } + public static .<> IsPositiveOrZero(this ..IValueSource<> valueSource) { } + public static .<> IsZero(this ..IValueSource<> valueSource) { } + } + public static class TimeSpanExtensions + { + public static Days(this int days) { } + public static Hours(this int hours) { } + public static Milliseconds(this int milliseconds) { } + public static Minutes(this int minutes) { } + public static Seconds(this int seconds) { } + } + public static class TimeSpanIsExtensions + { + public static ..TimeSpanEqualToAssertionBuilderWrapper IsEqualTo(this ..IValueSource<> valueSource, expected, [.("expected")] string doNotPopulateThisValue1 = null) { } + public static .<> IsZero(this ..IValueSource<> valueSource) { } + } + public static class TimeSpanIsNotExtensions + { + public static .<> IsNotZero(this ..IValueSource<> valueSource) { } + } + public class TimeSpanTimeSpanAssertionExtensionsIsNegativeWithTimeSpanAssertCondition : .<> + { + public TimeSpanTimeSpanAssertionExtensionsIsNegativeWithTimeSpanAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TimeSpanTimeSpanAssertionExtensionsIsPositiveWithTimeSpanAssertCondition : .<> + { + public TimeSpanTimeSpanAssertionExtensionsIsPositiveWithTimeSpanAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TimeSpanTimeSpanAssertionExtensionsIsZeroWithTimeSpanAssertCondition : .<> + { + public TimeSpanTimeSpanAssertionExtensionsIsZeroWithTimeSpanAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult( actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.<>("IsAbstract")] + [.<>("IsAbstract", CustomName="IsNotAbstract", NegateLogic=true)] + [.<>("IsArray")] + [.<>("IsArray", CustomName="IsNotArray", NegateLogic=true)] + [.<>("IsAssignableFrom")] + [.<>("IsAssignableFrom", CustomName="IsNotAssignableFrom", NegateLogic=true)] + [.<>("IsClass")] + [.<>("IsClass", CustomName="IsNotClass", NegateLogic=true)] + [.<>("IsEnum")] + [.<>("IsEnum", CustomName="IsNotEnum", NegateLogic=true)] + [.<>("IsGenericType")] + [.<>("IsGenericType", CustomName="IsNotGenericType", NegateLogic=true)] + [.<>("IsGenericTypeDefinition")] + [.<>("IsGenericTypeDefinition", CustomName="IsNotGenericTypeDefinition", NegateLogic=true)] + [.<>("IsInterface")] + [.<>("IsInterface", CustomName="IsNotInterface", NegateLogic=true)] + [.<>("IsNested")] + [.<>("IsNested", CustomName="IsNotNested", NegateLogic=true)] + [.<>("IsPrimitive")] + [.<>("IsPrimitive", CustomName="IsNotPrimitive", NegateLogic=true)] + [.<>("IsPublic")] + [.<>("IsPublic", CustomName="IsNotPublic", NegateLogic=true)] + [.<>("IsSealed")] + [.<>("IsSealed", CustomName="IsNotSealed", NegateLogic=true)] + [.<>("IsSerializable")] + [.<>("IsSerializable", CustomName="IsNotSerializable", NegateLogic=true)] + [.<>("IsValueType")] + [.<>("IsValueType", CustomName="IsReferenceType", NegateLogic=true)] + public static class TypeAssertionExtensions + { + public static .<> IsAbstract(this ..IValueSource<> valueSource) { } + public static .<> IsArray(this ..IValueSource<> valueSource) { } + public static .<> IsAssignableFrom(this ..IValueSource<> valueSource, c, [.("c")] string? doNotPopulateThisValue1 = null) { } + public static .<> IsClass(this ..IValueSource<> valueSource) { } + public static .<> IsEnum(this ..IValueSource<> valueSource) { } + public static .<> IsGenericType(this ..IValueSource<> valueSource) { } + public static .<> IsGenericTypeDefinition(this ..IValueSource<> valueSource) { } + public static .<> IsInterface(this ..IValueSource<> valueSource) { } + public static .<> IsNested(this ..IValueSource<> valueSource) { } + public static .<> IsNotAbstract(this ..IValueSource<> valueSource) { } + public static .<> IsNotArray(this ..IValueSource<> valueSource) { } + public static .<> IsNotAssignableFrom(this ..IValueSource<> valueSource, c, [.("c")] string? doNotPopulateThisValue1 = null) { } + public static .<> IsNotClass(this ..IValueSource<> valueSource) { } + public static .<> IsNotEnum(this ..IValueSource<> valueSource) { } + public static .<> IsNotGenericType(this ..IValueSource<> valueSource) { } + public static .<> IsNotGenericTypeDefinition(this ..IValueSource<> valueSource) { } + public static .<> IsNotInterface(this ..IValueSource<> valueSource) { } + public static .<> IsNotNested(this ..IValueSource<> valueSource) { } + public static .<> IsNotPrimitive(this ..IValueSource<> valueSource) { } + public static .<> IsNotPublic(this ..IValueSource<> valueSource) { } + public static .<> IsNotSealed(this ..IValueSource<> valueSource) { } + public static .<> IsNotSerializable(this ..IValueSource<> valueSource) { } + public static .<> IsPrimitive(this ..IValueSource<> valueSource) { } + public static .<> IsPublic(this ..IValueSource<> valueSource) { } + public static .<> IsReferenceType(this ..IValueSource<> valueSource) { } + public static .<> IsSealed(this ..IValueSource<> valueSource) { } + public static .<> IsSerializable(this ..IValueSource<> valueSource) { } + public static .<> IsValueType(this ..IValueSource<> valueSource) { } + } + public class TypeIsAbstractAssertCondition : .<> + { + public TypeIsAbstractAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsArrayAssertCondition : .<> + { + public TypeIsArrayAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsAssignableFromWithTypeAssertCondition : .<> + { + public TypeIsAssignableFromWithTypeAssertCondition( c, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsClassAssertCondition : .<> + { + public TypeIsClassAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsEnumAssertCondition : .<> + { + public TypeIsEnumAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsGenericTypeAssertCondition : .<> + { + public TypeIsGenericTypeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsGenericTypeDefinitionAssertCondition : .<> + { + public TypeIsGenericTypeDefinitionAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsInterfaceAssertCondition : .<> + { + public TypeIsInterfaceAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsNestedAssertCondition : .<> + { + public TypeIsNestedAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsPrimitiveAssertCondition : .<> + { + public TypeIsPrimitiveAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsPublicAssertCondition : .<> + { + public TypeIsPublicAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsSealedAssertCondition : .<> + { + public TypeIsSealedAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsSerializableAssertCondition : .<> + { + public TypeIsSerializableAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class TypeIsValueTypeAssertCondition : .<> + { + public TypeIsValueTypeAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.(typeof(), "IsHexDigit")] + [.(typeof(), "IsHexDigit", CustomName="IsNotHexDigit", NegateLogic=true)] + [.(typeof(), "IsHexEncoding")] + [.(typeof(), "IsHexEncoding", CustomName="IsNotHexEncoding", NegateLogic=true)] + [.(typeof(), "IsWellFormedUriString")] + [.(typeof(), "IsWellFormedUriString", CustomName="IsNotWellFormedUriString", NegateLogic=true)] + [.<>("IsAbsoluteUri")] + [.<>("IsAbsoluteUri", CustomName="IsNotAbsoluteUri", NegateLogic=true)] + [.<>("IsBaseOf")] + [.<>("IsBaseOf", CustomName="IsNotBaseOf", NegateLogic=true)] + [.<>("IsDefaultPort")] + [.<>("IsDefaultPort", CustomName="IsNotDefaultPort", NegateLogic=true)] + [.<>("IsFile")] + [.<>("IsFile", CustomName="IsNotFile", NegateLogic=true)] + [.<>("IsLoopback")] + [.<>("IsLoopback", CustomName="IsNotLoopback", NegateLogic=true)] + [.<>("IsUnc")] + [.<>("IsUnc", CustomName="IsNotUnc", NegateLogic=true)] + [.<>("IsWellFormedOriginalString")] + [.<>("IsWellFormedOriginalString", CustomName="IsNotWellFormedOriginalString", NegateLogic=true)] + [.<>(typeof(.), "IsHttp")] + [.<>(typeof(.), "IsHttp", CustomName="IsNotHttp", NegateLogic=true)] + [.<>(typeof(.), "IsHttpOrHttps")] + [.<>(typeof(.), "IsHttpOrHttps", CustomName="IsNotHttpOrHttps", NegateLogic=true)] + [.<>(typeof(.), "IsHttps")] + [.<>(typeof(.), "IsHttps", CustomName="IsNotHttps", NegateLogic=true)] + public static class UriAssertionExtensions + { + public static .<> IsAbsoluteUri(this ..IValueSource<> valueSource) { } + public static .<> IsBaseOf(this ..IValueSource<> valueSource, uri, [.("uri")] string? doNotPopulateThisValue1 = null) { } + public static .<> IsDefaultPort(this ..IValueSource<> valueSource) { } + public static .<> IsFile(this ..IValueSource<> valueSource) { } + public static . IsHexDigit(this ..IValueSource valueSource) { } + public static . IsHexEncoding(this ..IValueSource valueSource, int index, [.("index")] string? doNotPopulateThisValue1 = null) { } + public static .<> IsHttp(this ..IValueSource<> valueSource) { } + public static .<> IsHttpOrHttps(this ..IValueSource<> valueSource) { } + public static .<> IsHttps(this ..IValueSource<> valueSource) { } + public static .<> IsLoopback(this ..IValueSource<> valueSource) { } + public static .<> IsNotAbsoluteUri(this ..IValueSource<> valueSource) { } + public static .<> IsNotBaseOf(this ..IValueSource<> valueSource, uri, [.("uri")] string? doNotPopulateThisValue1 = null) { } + public static .<> IsNotDefaultPort(this ..IValueSource<> valueSource) { } + public static .<> IsNotFile(this ..IValueSource<> valueSource) { } + public static . IsNotHexDigit(this ..IValueSource valueSource) { } + public static . IsNotHexEncoding(this ..IValueSource valueSource, int index, [.("index")] string? doNotPopulateThisValue1 = null) { } + public static .<> IsNotHttp(this ..IValueSource<> valueSource) { } + public static .<> IsNotHttpOrHttps(this ..IValueSource<> valueSource) { } + public static .<> IsNotHttps(this ..IValueSource<> valueSource) { } + public static .<> IsNotLoopback(this ..IValueSource<> valueSource) { } + public static .<> IsNotUnc(this ..IValueSource<> valueSource) { } + public static .<> IsNotWellFormedOriginalString(this ..IValueSource<> valueSource) { } + public static . IsNotWellFormedUriString(this ..IValueSource valueSource, uriKind, [.("uriKind")] string? doNotPopulateThisValue1 = null) { } + public static .<> IsUnc(this ..IValueSource<> valueSource) { } + public static .<> IsWellFormedOriginalString(this ..IValueSource<> valueSource) { } + public static . IsWellFormedUriString(this ..IValueSource valueSource, uriKind, [.("uriKind")] string? doNotPopulateThisValue1 = null) { } + } + public class UriIsAbsoluteUriAssertCondition : .<> + { + public UriIsAbsoluteUriAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class UriIsBaseOfWithUriAssertCondition : .<> + { + public UriIsBaseOfWithUriAssertCondition( uri, bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class UriIsDefaultPortAssertCondition : .<> + { + public UriIsDefaultPortAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class UriIsFileAssertCondition : .<> + { + public UriIsFileAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class UriIsLoopbackAssertCondition : .<> + { + public UriIsLoopbackAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class UriIsUncAssertCondition : .<> + { + public UriIsUncAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class UriIsWellFormedOriginalStringAssertCondition : .<> + { + public UriIsWellFormedOriginalStringAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class UriUriAssertionExtensionsIsHttpOrHttpsWithUriAssertCondition : .<> + { + public UriUriAssertionExtensionsIsHttpOrHttpsWithUriAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class UriUriAssertionExtensionsIsHttpWithUriAssertCondition : .<> + { + public UriUriAssertionExtensionsIsHttpWithUriAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class UriUriAssertionExtensionsIsHttpsWithUriAssertCondition : .<> + { + public UriUriAssertionExtensionsIsHttpsWithUriAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.<>(typeof(.), "IsMajorVersion")] + [.<>(typeof(.), "IsMajorVersion", CustomName="IsNotMajorVersion", NegateLogic=true)] + public static class VersionAssertionExtensions + { + public static .<> IsMajorVersion(this ..IValueSource<> valueSource) { } + public static .<> IsNotMajorVersion(this ..IValueSource<> valueSource) { } + } + public class VersionVersionAssertionExtensionsIsMajorVersionWithVersionAssertCondition : .<> + { + public VersionVersionAssertionExtensionsIsMajorVersionWithVersionAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + [.<>("IsAlive")] + [.<>("IsAlive", CustomName="IsDead", NegateLogic=true)] + [.<>("TrackResurrection")] + [.<>("TrackResurrection", CustomName="DoesNotTrackResurrection", NegateLogic=true)] + public static class WeakReferenceAssertionExtensions + { + public static .<> DoesNotTrackResurrection(this ..IValueSource<> valueSource) { } + public static .<> IsAlive(this ..IValueSource<> valueSource) { } + public static .<> IsDead(this ..IValueSource<> valueSource) { } + public static .<> TrackResurrection(this ..IValueSource<> valueSource) { } + } + public class WeakReferenceIsAliveAssertCondition : .<> + { + public WeakReferenceIsAliveAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } + } + public class WeakReferenceTrackResurrectionAssertCondition : .<> + { + public WeakReferenceTrackResurrectionAssertCondition(bool negated = false) { } + protected override string GetExpectation() { } + protected override .<.> GetResult(? actualValue, ? exception, .AssertionMetadata assertionMetadata) { } } } namespace .Helpers From 3385ee138104ce103f4e99356956b66ac14d119f Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Tue, 30 Sep 2025 11:45:27 +0100 Subject: [PATCH 2/2] feat(AOT): add RequiresDynamicCode attributes to support dynamic tests in AOT scenarios --- TUnit.Core/DynamicTestBuilderContext.cs | 5 ++++- TUnit.Core/Extensions/TestContextExtensions.cs | 1 + TUnit.Core/Interfaces/ITestRegistry.cs | 3 ++- TUnit.Engine/Building/Collectors/AotTestDataCollector.cs | 5 +++++ TUnit.Engine/Building/ReflectionMetadataBuilder.cs | 7 ------- TUnit.Engine/Services/TestRegistry.cs | 6 ++++++ ....Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt | 6 ++++++ ....Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt | 6 ++++++ 8 files changed, 30 insertions(+), 9 deletions(-) diff --git a/TUnit.Core/DynamicTestBuilderContext.cs b/TUnit.Core/DynamicTestBuilderContext.cs index 25d5225fec..0c6c04bbbb 100644 --- a/TUnit.Core/DynamicTestBuilderContext.cs +++ b/TUnit.Core/DynamicTestBuilderContext.cs @@ -1,3 +1,5 @@ +using System.Diagnostics.CodeAnalysis; + namespace TUnit.Core; /// @@ -20,6 +22,7 @@ public DynamicTestBuilderContext(string filePath, int lineNumber) public IReadOnlyList Tests => _tests.AsReadOnly(); + [RequiresDynamicCode("Adding dynamic tests requires reflection which is not supported in native AOT scenarios.")] public void AddTest(AbstractDynamicTest test) { // Set creator location if the test implements IDynamicTestCreatorLocation @@ -28,7 +31,7 @@ public void AddTest(AbstractDynamicTest test) testWithLocation.CreatorFilePath = FilePath; testWithLocation.CreatorLineNumber = LineNumber; } - + _tests.Add(test); } } diff --git a/TUnit.Core/Extensions/TestContextExtensions.cs b/TUnit.Core/Extensions/TestContextExtensions.cs index ba50b41e97..ffa127dfa0 100644 --- a/TUnit.Core/Extensions/TestContextExtensions.cs +++ b/TUnit.Core/Extensions/TestContextExtensions.cs @@ -24,6 +24,7 @@ public static string GetClassTypeName(this TestContext context) return $"{context.TestDetails.ClassType.Name}({string.Join(", ", context.TestDetails.TestClassArguments.Select(a => ArgumentFormatter.Format(a, context.ArgumentDisplayFormatters)))})"; } + [RequiresDynamicCode("Adding dynamic tests requires reflection which is not supported in native AOT scenarios.")] public static async Task AddDynamicTest<[DynamicallyAccessedMembers( DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors diff --git a/TUnit.Core/Interfaces/ITestRegistry.cs b/TUnit.Core/Interfaces/ITestRegistry.cs index 51305ece09..f35120875e 100644 --- a/TUnit.Core/Interfaces/ITestRegistry.cs +++ b/TUnit.Core/Interfaces/ITestRegistry.cs @@ -14,6 +14,7 @@ public interface ITestRegistry /// The current test context /// The dynamic test instance to add /// A task that completes when the test has been queued for execution + [RequiresDynamicCode("Adding dynamic tests requires runtime compilation and reflection which are not supported in native AOT scenarios.")] Task AddDynamicTest<[DynamicallyAccessedMembers( DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors @@ -21,6 +22,6 @@ public interface ITestRegistry | DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods | DynamicallyAccessedMemberTypes.PublicFields - | DynamicallyAccessedMemberTypes.NonPublicFields)] T>(TestContext context, DynamicTest dynamicTest) + | DynamicallyAccessedMemberTypes.NonPublicFields)] T>(TestContext context, DynamicTest dynamicTest) where T : class; } \ No newline at end of file diff --git a/TUnit.Engine/Building/Collectors/AotTestDataCollector.cs b/TUnit.Engine/Building/Collectors/AotTestDataCollector.cs index 81c663447b..90aa7ad316 100644 --- a/TUnit.Engine/Building/Collectors/AotTestDataCollector.cs +++ b/TUnit.Engine/Building/Collectors/AotTestDataCollector.cs @@ -76,6 +76,8 @@ private async IAsyncEnumerable CollectDynamicTestsStreaming( } } + [UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", + Justification = "Dynamic tests are opt-in and users are warned via RequiresDynamicCode on the method they call")] private async IAsyncEnumerable ConvertDynamicTestToMetadataStreaming( AbstractDynamicTest abstractDynamicTest, [EnumeratorCancellation] CancellationToken cancellationToken = default) @@ -92,6 +94,7 @@ private async IAsyncEnumerable ConvertDynamicTestToMetadataStreami } } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Dynamic tests require runtime compilation of lambda expressions and are not supported in native AOT scenarios.")] private Task CreateMetadataFromDynamicDiscoveryResult(DynamicDiscoveryResult result) { if (result.TestClassType == null || result.TestMethod == null) @@ -144,6 +147,7 @@ private Task CreateMetadataFromDynamicDiscoveryResult(DynamicDisco }); } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Dynamic test instance creation requires Activator.CreateInstance and MakeGenericType which are not supported in native AOT scenarios.")] [UnconditionalSuppressMessage("Trimming", "IL2070:'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructors()'", Justification = "AOT mode uses source-generated factories")] @@ -187,6 +191,7 @@ private Task CreateMetadataFromDynamicDiscoveryResult(DynamicDisco }; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Dynamic test invocation requires LambdaExpression.Compile() which is not supported in native AOT scenarios.")] private static Func CreateAotDynamicTestInvoker(DynamicDiscoveryResult result) { return async (instance, args) => diff --git a/TUnit.Engine/Building/ReflectionMetadataBuilder.cs b/TUnit.Engine/Building/ReflectionMetadataBuilder.cs index f107b5e958..178c9f19f7 100644 --- a/TUnit.Engine/Building/ReflectionMetadataBuilder.cs +++ b/TUnit.Engine/Building/ReflectionMetadataBuilder.cs @@ -21,13 +21,6 @@ public static MethodMetadata CreateMethodMetadata( | DynamicallyAccessedMemberTypes.PublicProperties)] Type type, System.Reflection.MethodInfo method) { -#if NET - if (!RuntimeFeature.IsDynamicCodeSupported) - { - throw new Exception("Using TUnit Reflection mechanisms isn't supported in AOT mode"); - } -#endif - return new MethodMetadata { Name = method.Name, diff --git a/TUnit.Engine/Services/TestRegistry.cs b/TUnit.Engine/Services/TestRegistry.cs index a156a86e8a..14ffac453c 100644 --- a/TUnit.Engine/Services/TestRegistry.cs +++ b/TUnit.Engine/Services/TestRegistry.cs @@ -31,6 +31,7 @@ public TestRegistry(TestBuilderPipeline testBuilderPipeline, _sessionId = sessionId; _sessionCancellationToken = sessionCancellationToken; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Adding dynamic tests requires runtime compilation and reflection which are not supported in native AOT scenarios.")] public async Task AddDynamicTest<[DynamicallyAccessedMembers( DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors @@ -64,6 +65,8 @@ public TestRegistry(TestBuilderPipeline testBuilderPipeline, await ProcessPendingDynamicTests(); } + [UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", + Justification = "Dynamic tests are opt-in and users are warned via RequiresDynamicCode on AddDynamicTest method")] private async Task ProcessPendingDynamicTests() { var testsToProcess = new List(); @@ -100,6 +103,7 @@ private async Task ProcessPendingDynamicTests() } } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Dynamic tests require runtime compilation of lambda expressions and are not supported in native AOT scenarios.")] private async Task CreateMetadataFromDynamicDiscoveryResult(DynamicDiscoveryResult result) { if (result.TestClassType == null || result.TestMethod == null) @@ -148,6 +152,7 @@ private async Task CreateMetadataFromDynamicDiscoveryResult(Dynami }); } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Dynamic test instance creation requires Activator.CreateInstance which is not supported in native AOT scenarios.")] [UnconditionalSuppressMessage("Trimming", "IL2067:Target parameter argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call", Justification = "Dynamic tests require reflection")] @@ -168,6 +173,7 @@ private async Task CreateMetadataFromDynamicDiscoveryResult(Dynami }; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Dynamic test invocation requires LambdaExpression.Compile() which is not supported in native AOT scenarios.")] private static Func CreateRuntimeTestInvoker(DynamicDiscoveryResult result) { return async (instance, args) => diff --git a/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt b/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt index 2280fa4ab1..5603f7613a 100644 --- a/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt +++ b/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt @@ -646,6 +646,8 @@ namespace public string FilePath { get; } public int LineNumber { get; } public .<.AbstractDynamicTest> Tests { get; } + [.("Adding dynamic tests requires reflection which is not supported in native AOT sce" + + "narios.")] public void AddTest(.AbstractDynamicTest test) { } } public static class DynamicTestHelper @@ -1925,6 +1927,8 @@ namespace .Extensions } public static class TestContextExtensions { + [.("Adding dynamic tests requires reflection which is not supported in native AOT sce" + + "narios.")] public static . AddDynamicTest<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicFields | ..NonPublicFields | ..PublicProperties)] T>(this .TestContext context, .DynamicTest dynamicTest) where T : class { } public static string GetClassTypeName(this .TestContext context) { } @@ -2363,6 +2367,8 @@ namespace .Interfaces } public interface ITestRegistry { + [.("Adding dynamic tests requires runtime compilation and reflection which are not su" + + "pported in native AOT scenarios.")] . AddDynamicTest<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicFields | ..NonPublicFields | ..PublicProperties)] T>(.TestContext context, .DynamicTest dynamicTest) where T : class; } diff --git a/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt b/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt index c8ad3f922b..6a6e6e9c70 100644 --- a/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt +++ b/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt @@ -646,6 +646,8 @@ namespace public string FilePath { get; } public int LineNumber { get; } public .<.AbstractDynamicTest> Tests { get; } + [.("Adding dynamic tests requires reflection which is not supported in native AOT sce" + + "narios.")] public void AddTest(.AbstractDynamicTest test) { } } public static class DynamicTestHelper @@ -1925,6 +1927,8 @@ namespace .Extensions } public static class TestContextExtensions { + [.("Adding dynamic tests requires reflection which is not supported in native AOT sce" + + "narios.")] public static . AddDynamicTest<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicFields | ..NonPublicFields | ..PublicProperties)] T>(this .TestContext context, .DynamicTest dynamicTest) where T : class { } public static string GetClassTypeName(this .TestContext context) { } @@ -2363,6 +2367,8 @@ namespace .Interfaces } public interface ITestRegistry { + [.("Adding dynamic tests requires runtime compilation and reflection which are not su" + + "pported in native AOT scenarios.")] . AddDynamicTest<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicFields | ..NonPublicFields | ..PublicProperties)] T>(.TestContext context, .DynamicTest dynamicTest) where T : class; }