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
expectedSubSpanReadOnlySpan<T>The sub-span expected to be in the span
actualSpanReadOnlySpan<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
expectedSubSpanReadOnlySpan<T>The sub-span expected to be in the span
actualSpanSpan<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
expectedSubSpanSpan<T>The sub-span expected to be in the span
actualSpanReadOnlySpan<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
expectedSubSpanSpan<T>The sub-span expected to be in the span
actualSpanSpan<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
expectedSubSpanReadOnlySpan<T>The sub-span expected not to be in the span
actualSpanReadOnlySpan<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
expectedSubSpanReadOnlySpan<T>The sub-span expected not to be in the span
actualSpanSpan<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
expectedSubSpanSpan<T>The sub-span expected not to be in the span
actualSpanReadOnlySpan<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
expectedSubSpanSpan<T>The sub-span expected not to be in the span
actualSpanSpan<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
expectedSpanReadOnlySpan<T>The expected span value.
actualSpanReadOnlySpan<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
expectedSpanReadOnlySpan<T>The expected span value.
actualSpanSpan<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
expectedSpanReadOnlySpan<T>The expected span value.
actualArrayT[]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
expectedSpanSpan<T>The expected span value.
actualSpanReadOnlySpan<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
Type Parameters
T
Examples
Add an example for this method ?
Contribution guide.
Exceptions
- EqualException
Thrown when the spans are not equal.