Table of Contents

Class SpanAsserts

Namespace
Asserts
Assembly
xunit.v3.assert.dll
public class SpanAsserts
Inheritance
SpanAsserts
Inherited Members

Methods

Contains<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

Verifies that a span contains a given sub-span

public static void Contains<T>(ReadOnlySpan<T> expectedSubSpan, ReadOnlySpan<T> actualSpan) where T : IEquatable<T>

Parameters

expectedSubSpan ReadOnlySpan<T>

The sub-span expected to be in the span

actualSpan ReadOnlySpan<T>

The span to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the sub-span is not present inside the span

Contains<T>(ReadOnlySpan<T>, Span<T>)

Verifies that a span contains a given sub-span

public static void Contains<T>(ReadOnlySpan<T> expectedSubSpan, Span<T> actualSpan) where T : IEquatable<T>

Parameters

expectedSubSpan ReadOnlySpan<T>

The sub-span expected to be in the span

actualSpan Span<T>

The span to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the sub-span is not present inside the span

Contains<T>(Span<T>, ReadOnlySpan<T>)

Verifies that a span contains a given sub-span

public static void Contains<T>(Span<T> expectedSubSpan, ReadOnlySpan<T> actualSpan) where T : IEquatable<T>

Parameters

expectedSubSpan Span<T>

The sub-span expected to be in the span

actualSpan ReadOnlySpan<T>

The span to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the sub-span is not present inside the span

Contains<T>(Span<T>, Span<T>)

Verifies that a span contains a given sub-span

public static void Contains<T>(Span<T> expectedSubSpan, Span<T> actualSpan) where T : IEquatable<T>

Parameters

expectedSubSpan Span<T>

The sub-span expected to be in the span

actualSpan Span<T>

The span to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the sub-span is not present inside the span

DoesNotContain<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

Verifies that a span does not contain a given sub-span

public static void DoesNotContain<T>(ReadOnlySpan<T> expectedSubSpan, ReadOnlySpan<T> actualSpan) where T : IEquatable<T>

Parameters

expectedSubSpan ReadOnlySpan<T>

The sub-span expected not to be in the span

actualSpan ReadOnlySpan<T>

The span to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

DoesNotContainException

Thrown when the sub-span is present inside the span

DoesNotContain<T>(ReadOnlySpan<T>, Span<T>)

Verifies that a span does not contain a given sub-span

public static void DoesNotContain<T>(ReadOnlySpan<T> expectedSubSpan, Span<T> actualSpan) where T : IEquatable<T>

Parameters

expectedSubSpan ReadOnlySpan<T>

The sub-span expected not to be in the span

actualSpan Span<T>

The span to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

DoesNotContainException

Thrown when the sub-span is present inside the span

DoesNotContain<T>(Span<T>, ReadOnlySpan<T>)

Verifies that a span does not contain a given sub-span

public static void DoesNotContain<T>(Span<T> expectedSubSpan, ReadOnlySpan<T> actualSpan) where T : IEquatable<T>

Parameters

expectedSubSpan Span<T>

The sub-span expected not to be in the span

actualSpan ReadOnlySpan<T>

The span to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

DoesNotContainException

Thrown when the sub-span is present inside the span

DoesNotContain<T>(Span<T>, Span<T>)

Verifies that a span does not contain a given sub-span

public static void DoesNotContain<T>(Span<T> expectedSubSpan, Span<T> actualSpan) where T : IEquatable<T>

Parameters

expectedSubSpan Span<T>

The sub-span expected not to be in the span

actualSpan Span<T>

The span to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

DoesNotContainException

Thrown when the sub-span is present inside the span

Equal<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

Verifies that two spans contain the same values in the same order.

public static void Equal<T>(ReadOnlySpan<T> expectedSpan, ReadOnlySpan<T> actualSpan) where T : IEquatable<T>

Parameters

expectedSpan ReadOnlySpan<T>

The expected span value.

actualSpan ReadOnlySpan<T>

The actual span value.

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

EqualException

Thrown when the spans are not equal.

Equal<T>(ReadOnlySpan<T>, Span<T>)

Verifies that two spans contain the same values in the same order.

public static void Equal<T>(ReadOnlySpan<T> expectedSpan, Span<T> actualSpan) where T : IEquatable<T>

Parameters

expectedSpan ReadOnlySpan<T>

The expected span value.

actualSpan Span<T>

The actual span value.

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

EqualException

Thrown when the spans are not equal.

Equal<T>(ReadOnlySpan<T>, T[])

Verifies that a span and an array contain the same values in the same order.

public static void Equal<T>(ReadOnlySpan<T> expectedSpan, T[] actualArray) where T : IEquatable<T>

Parameters

expectedSpan ReadOnlySpan<T>

The expected span value.

actualArray T[]

The actual array value.

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

EqualException

Thrown when the collections are not equal.

Equal<T>(Span<T>, ReadOnlySpan<T>)

Verifies that two spans contain the same values in the same order.

public static void Equal<T>(Span<T> expectedSpan, ReadOnlySpan<T> actualSpan) where T : IEquatable<T>

Parameters

expectedSpan Span<T>

The expected span value.

actualSpan ReadOnlySpan<T>

The actual span value.

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

EqualException

Thrown when the spans are not equal.

Equal<T>(Span<T>, Span<T>)

Verifies that two spans contain the same values in the same order.

public static void Equal<T>(Span<T> expectedSpan, Span<T> actualSpan) where T : IEquatable<T>

Parameters

expectedSpan Span<T>

The expected span value.

actualSpan Span<T>

The actual span value.

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

EqualException

Thrown when the spans are not equal.