[Root] / FluentAssertions Assembly / FluentAssertions Namespace / AssertionExtensions Class / Should Method
In This Topic
    Should Method (AssertionExtensions)
    In This Topic
    Overload List
    OverloadDescription
    Returns an FluentAssertions.Specialized.ExecutionTimeAssertions object that can be used to assert the current FluentAssertions.Specialized.ExecutionTime.  
    Returns an FluentAssertions.Types.AssemblyAssertions object that can be used to assert the current System.Reflection.Assembly.  
    Returns an FluentAssertions.Xml.XDocumentAssertions object that can be used to assert the current System.Xml.Linq.XElement.  
    Returns an FluentAssertions.Xml.XElementAssertions object that can be used to assert the current System.Xml.Linq.XElement.  
    Returns an FluentAssertions.Xml.XAttributeAssertions object that can be used to assert the current System.Xml.Linq.XAttribute.  
    Returns a FluentAssertions.Streams.StreamAssertions object that can be used to assert the current System.IO.Stream.  
    Returns a FluentAssertions.Streams.BufferedStreamAssertions object that can be used to assert the current System.IO.BufferedStream.  
    Returns a FluentAssertions.Collections.SpanAssertions<T> object that can be used to assert the current Span.  
    Returns a FluentAssertions.Collections.SpanAssertions<T> object that can be used to assert the current ReadOnlySpan.  
    Returns a FluentAssertions.Collections.StringCollectionAssertions object that can be used to assert the current Span of strings.  
    Returns a FluentAssertions.Collections.StringCollectionAssertions object that can be used to assert the current ReadOnlySpan of strings.  
    Returns a FluentAssertions.Collections.GenericCollectionAssertions<T> object that can be used to assert the current Memory.  
    Returns a FluentAssertions.Collections.GenericCollectionAssertions<T> object that can be used to assert the current ReadOnlyMemory.  
    Returns an FluentAssertions.Primitives.ObjectAssertions object that can be used to assert the current System.Object.  
    Returns a FluentAssertions.Primitives.BooleanAssertions object that can be used to assert the current System.Boolean.  
    Returns a FluentAssertions.Primitives.NullableBooleanAssertions object that can be used to assert the current nullable System.Boolean.  
    Returns a FluentAssertions.Primitives.GuidAssertions object that can be used to assert the current System.Guid.  
    Returns a FluentAssertions.Primitives.NullableGuidAssertions object that can be used to assert the current nullable System.Guid.  
    Returns a FluentAssertions.Collections.GenericCollectionAssertions<T> object that can be used to assert the current IEnumerable.  
    Returns a FluentAssertions.Collections.StringCollectionAssertions object that can be used to assert the current IEnumerable.  
    Returns a FluentAssertions.Collections.GenericDictionaryAssertions<TCollection,TKey,TValue> object that can be used to assert the current IDictionary.  
    Returns a FluentAssertions.Collections.GenericDictionaryAssertions<TCollection,TKey,TValue> object that can be used to assert the current IEnumerable of KeyValuePair.  
    Returns a FluentAssertions.Collections.GenericDictionaryAssertions<TCollection,TKey,TValue> object that can be used to assert the current TCollection.  
    Returns a FluentAssertions.Primitives.DateTimeAssertions object that can be used to assert the current System.DateTime.  
    Returns a FluentAssertions.Primitives.DateTimeOffsetAssertions object that can be used to assert the current System.DateTimeOffset.  
    Returns a FluentAssertions.Primitives.NullableDateTimeAssertions object that can be used to assert the current nullable System.DateTime.  
    Returns a FluentAssertions.Primitives.NullableDateTimeOffsetAssertions object that can be used to assert the current nullable System.DateTimeOffset.  
    Returns a FluentAssertions.Primitives.DateOnlyAssertions object that can be used to assert the current System.DateOnly.  
    Returns a FluentAssertions.Primitives.NullableDateOnlyAssertions object that can be used to assert the current nullable System.DateOnly.  
    Returns a FluentAssertions.Primitives.TimeOnlyAssertions object that can be used to assert the current System.TimeOnly.  
    Returns a FluentAssertions.Primitives.NullableTimeOnlyAssertions object that can be used to assert the current nullable System.TimeOnly.  
    Returns a FluentAssertions.Numeric.ComparableTypeAssertions<T> object that can be used to assert the current IComparable.  
    Returns a FluentAssertions.Numeric.NumericAssertions<T> object that can be used to assert the current System.Int32.  
    Returns a FluentAssertions.Numeric.NullableNumericAssertions<T> object that can be used to assert the current nullable System.Int32.  
    Returns a FluentAssertions.Numeric.NumericAssertions<T> object that can be used to assert the current System.UInt32.  
    Returns a FluentAssertions.Numeric.NullableNumericAssertions<T> object that can be used to assert the current nullable System.UInt32.  
    Returns a FluentAssertions.Numeric.NumericAssertions<T> object that can be used to assert the current System.Decimal.  
    Returns a FluentAssertions.Numeric.NullableNumericAssertions<T> object that can be used to assert the current nullable System.Decimal.  
    Returns a FluentAssertions.Numeric.NumericAssertions<T> object that can be used to assert the current System.Byte.  
    Returns a FluentAssertions.Numeric.NullableNumericAssertions<T> object that can be used to assert the current nullable System.Byte.  
    Returns a FluentAssertions.Numeric.NumericAssertions<T> object that can be used to assert the current System.SByte.  
    Returns a FluentAssertions.Numeric.NullableNumericAssertions<T> object that can be used to assert the current nullable System.SByte.  
    Returns a FluentAssertions.Numeric.NumericAssertions<T> object that can be used to assert the current System.Int16.  
    Returns a FluentAssertions.Numeric.NullableNumericAssertions<T> object that can be used to assert the current nullable System.Int16.  
    Returns a FluentAssertions.Numeric.NumericAssertions<T> object that can be used to assert the current System.UInt16.  
    Returns a FluentAssertions.Numeric.NullableNumericAssertions<T> object that can be used to assert the current nullable System.UInt16.  
    Returns a FluentAssertions.Numeric.NumericAssertions<T> object that can be used to assert the current System.Int64.  
    Returns a FluentAssertions.Numeric.NullableNumericAssertions<T> object that can be used to assert the current nullable System.Int64.  
    Returns a FluentAssertions.Numeric.NumericAssertions<T> object that can be used to assert the current System.UInt64.  
    Returns a FluentAssertions.Numeric.NullableNumericAssertions<T> object that can be used to assert the current nullable System.UInt64.  
    Returns a FluentAssertions.Numeric.NumericAssertions<T> object that can be used to assert the current System.Single.  
    Returns a FluentAssertions.Numeric.NullableNumericAssertions<T> object that can be used to assert the current nullable System.Single.  
    Returns a FluentAssertions.Numeric.NumericAssertions<T> object that can be used to assert the current System.Double.  
    Returns a FluentAssertions.Numeric.NullableNumericAssertions<T> object that can be used to assert the current nullable System.Double.  
    Returns a FluentAssertions.Primitives.StringAssertions object that can be used to assert the current System.String.  
    Returns a FluentAssertions.Primitives.SimpleTimeSpanAssertions object that can be used to assert the current System.TimeSpan.  
    Returns a FluentAssertions.Primitives.NullableSimpleTimeSpanAssertions object that can be used to assert the current nullable System.TimeSpan.  
    Returns a FluentAssertions.Types.TypeAssertions object that can be used to assert the current System.Type.  
    Returns a FluentAssertions.Types.TypeAssertions object that can be used to assert the current System.Type.  
    Returns a FluentAssertions.Types.MethodBaseAssertions<TSubject,TAssertions> object that can be used to assert the current System.Reflection.MethodInfo.  
    Returns a FluentAssertions.Types.MethodInfoAssertions object that can be used to assert the current System.Reflection.MethodInfo.  
    Returns a FluentAssertions.Types.MethodInfoSelectorAssertions object that can be used to assert the methods returned by the current FluentAssertions.Types.MethodInfoSelector.  
    Returns a FluentAssertions.Types.PropertyInfoAssertions object that can be used to assert the current FluentAssertions.Types.PropertyInfoSelector.  
    Returns a FluentAssertions.Types.PropertyInfoSelectorAssertions object that can be used to assert the properties returned by the current FluentAssertions.Types.PropertyInfoSelector.  
    Returns an FluentAssertions.Specialized.ActionAssertions object that can be used to assert the current System.Action.  
    Returns a FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions object that can be used to assert the current Func.  
    Returns a FluentAssertions.Specialized.GenericAsyncFunctionAssertions<TResult> object that can be used to assert the current System.Func{Task{T}}.  
    Returns a FluentAssertions.Specialized.FunctionAssertions<T> object that can be used to assert the current Func.  
    Returns a FluentAssertions.Specialized.TaskCompletionSourceAssertions<T> object that can be used to assert the current TaskCompletionSource.  
    Returns a FluentAssertions.Specialized.TaskCompletionSourceAssertions object that can be used to assert the current System.Threading.Tasks.TaskCompletionSource.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    You are asserting the AndConstraint<TParent> itself. Remove the Should() method directly following And.  
    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Standard: netstandard2.0, netstandard2.1.

    .NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also