Table of Contents

Class MemoryAsserts

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

Methods

Contains<T>(Memory<T>, Memory<T>)

Verifies that a Memory contains a given sub-Memory

public static void Contains<T>(Memory<T> expectedSubMemory, Memory<T> actualMemory) where T : IEquatable<T>

Parameters

expectedSubMemory Memory<T>

The sub-Memory expected to be in the Memory

actualMemory Memory<T>

The Memory to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

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

Contains<T>(Memory<T>, ReadOnlyMemory<T>)

Verifies that a Memory contains a given sub-Memory

public static void Contains<T>(Memory<T> expectedSubMemory, ReadOnlyMemory<T> actualMemory) where T : IEquatable<T>

Parameters

expectedSubMemory Memory<T>

The sub-Memory expected to be in the Memory

actualMemory ReadOnlyMemory<T>

The Memory to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

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

Contains<T>(ReadOnlyMemory<T>, Memory<T>)

Verifies that a Memory contains a given sub-Memory

public static void Contains<T>(ReadOnlyMemory<T> expectedSubMemory, Memory<T> actualMemory) where T : IEquatable<T>

Parameters

expectedSubMemory ReadOnlyMemory<T>

The sub-Memory expected to be in the Memory

actualMemory Memory<T>

The Memory to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

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

Contains<T>(ReadOnlyMemory<T>, ReadOnlyMemory<T>)

Verifies that a Memory contains a given sub-Memory

public static void Contains<T>(ReadOnlyMemory<T> expectedSubMemory, ReadOnlyMemory<T> actualMemory) where T : IEquatable<T>

Parameters

expectedSubMemory ReadOnlyMemory<T>

The sub-Memory expected to be in the Memory

actualMemory ReadOnlyMemory<T>

The Memory to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

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

DoesNotContain<T>(Memory<T>, Memory<T>)

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

public static void DoesNotContain<T>(Memory<T> expectedSubMemory, Memory<T> actualMemory) where T : IEquatable<T>

Parameters

expectedSubMemory Memory<T>

The sub-Memory expected not to be in the Memory

actualMemory Memory<T>

The Memory to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

DoesNotContainException

Thrown when the sub-Memory is present inside the Memory

DoesNotContain<T>(Memory<T>, ReadOnlyMemory<T>)

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

public static void DoesNotContain<T>(Memory<T> expectedSubMemory, ReadOnlyMemory<T> actualMemory) where T : IEquatable<T>

Parameters

expectedSubMemory Memory<T>

The sub-Memory expected not to be in the Memory

actualMemory ReadOnlyMemory<T>

The Memory to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

DoesNotContainException

Thrown when the sub-Memory is present inside the Memory

DoesNotContain<T>(ReadOnlyMemory<T>, Memory<T>)

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

public static void DoesNotContain<T>(ReadOnlyMemory<T> expectedSubMemory, Memory<T> actualMemory) where T : IEquatable<T>

Parameters

expectedSubMemory ReadOnlyMemory<T>

The sub-Memory expected not to be in the Memory

actualMemory Memory<T>

The Memory to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

DoesNotContainException

Thrown when the sub-Memory is present inside the Memory

DoesNotContain<T>(ReadOnlyMemory<T>, ReadOnlyMemory<T>)

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

public static void DoesNotContain<T>(ReadOnlyMemory<T> expectedSubMemory, ReadOnlyMemory<T> actualMemory) where T : IEquatable<T>

Parameters

expectedSubMemory ReadOnlyMemory<T>

The sub-Memory expected not to be in the Memory

actualMemory ReadOnlyMemory<T>

The Memory to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

DoesNotContainException

Thrown when the sub-Memory is present inside the Memory

Equal<T>(Memory<T>, Memory<T>)

Verifies that two Memory values are equivalent.

public static void Equal<T>(Memory<T> expectedMemory, Memory<T> actualMemory) where T : IEquatable<T>

Parameters

expectedMemory Memory<T>

The expected Memory value.

actualMemory Memory<T>

The actual Memory value.

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

EqualException

Thrown when the Memory values are not equivalent.

Equal<T>(Memory<T>, ReadOnlyMemory<T>)

Verifies that two Memory values are equivalent.

public static void Equal<T>(Memory<T> expectedMemory, ReadOnlyMemory<T> actualMemory) where T : IEquatable<T>

Parameters

expectedMemory Memory<T>

The expected Memory value.

actualMemory ReadOnlyMemory<T>

The actual Memory value.

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

EqualException

Thrown when the Memory values are not equivalent.

Equal<T>(ReadOnlyMemory<T>, Memory<T>)

Verifies that two Memory values are equivalent.

public static void Equal<T>(ReadOnlyMemory<T> expectedMemory, Memory<T> actualMemory) where T : IEquatable<T>

Parameters

expectedMemory ReadOnlyMemory<T>

The expected Memory value.

actualMemory Memory<T>

The actual Memory value.

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

EqualException

Thrown when the Memory values are not equivalent.

Equal<T>(ReadOnlyMemory<T>, ReadOnlyMemory<T>)

Verifies that two Memory values are equivalent.

public static void Equal<T>(ReadOnlyMemory<T> expectedMemory, ReadOnlyMemory<T> actualMemory) where T : IEquatable<T>

Parameters

expectedMemory ReadOnlyMemory<T>

The expected Memory value.

actualMemory ReadOnlyMemory<T>

The actual Memory value.

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

EqualException

Thrown when the Memory values are not equivalent.