Skip to content

ReadOnlySpanAssertions<T> Struct ​

Definition ​

Provides assertions for read-only span values with zero-allocation support.

c#
public sealed struct ReadOnlySpanAssertions<T>

View source

Type Parameters ​

NameDescription
TThe type of elements in the span.

Constructors ​

NameDescription
ReadOnlySpanAssertions(ReadOnlySpan<T>)Provides assertions for read-only span values with zero-allocation support.

Properties ​

NameDescription
ValueGets the span value being asserted on.

Methods ​

NameDescription
BeEmpty()Asserts that the span is empty.
NotBeEmpty()Asserts that the span is not empty.
NotSequenceEqual(ReadOnlySpan<T>)Asserts that the span is not sequence equal to the expected elements.
NotSequenceEqual(ReadOnlySpan<T>, IEqualityComparer<T>)Asserts that the span is not sequence equal to the expected elements using the specified equality comparer.
NotSequenceEqual(ReadOnlySpan<T>, Func<T, T, Boolean>)
NotSequenceEqual(IEnumerable<T>)Asserts that the span is not sequence equal to the expected enumerable elements.
NotSequenceEqual(IEnumerable<T>, IEqualityComparer<T>)Asserts that the span is not sequence equal to the expected enumerable elements using the specified equality comparer.
NotSequenceEqual(IEnumerable<T>, Func<T, T, Boolean>)
SequenceEqual(ReadOnlySpan<T>)Asserts that the span is sequence equal to the expected elements.
SequenceEqual(ReadOnlySpan<T>, IEqualityComparer<T>)Asserts that the span is sequence equal to the expected elements using the specified equality comparer.
SequenceEqual(ReadOnlySpan<T>, Func<T, T, Boolean>)
SequenceEqual(IEnumerable<T>)Asserts that the span is sequence equal to the expected enumerable elements.
SequenceEqual(IEnumerable<T>, IEqualityComparer<T>)Asserts that the span is sequence equal to the expected enumerable elements using the specified equality comparer.
SequenceEqual(IEnumerable<T>, Func<T, T, Boolean>)