Language

Assert.DoesNotContainAll Method

Definition

Overloads

Name Description
DoesNotContainAll(IEnumerable, IEnumerable, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity) and throws an exception if every element in notExpected occurs at least as many times in collection.

DoesNotContainAll(IEnumerable, IEnumerable, IEqualityComparer, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity) and throws an exception if every element in notExpected occurs at least as many times in collection.

DoesNotContainAll<T>(Memory<T>, Memory<T>, IEqualityComparer<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

DoesNotContainAll<T>(Span<T>, Span<T>, IEqualityComparer<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

DoesNotContainAll<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, IEqualityComparer<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

DoesNotContainAll<T>(ReadOnlyMemory<T>, ReadOnlyMemory<T>, IEqualityComparer<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

DoesNotContainAll<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity) and throws an exception if every element in notExpected occurs at least as many times in collection.

DoesNotContainAll<T>(Memory<T>, Memory<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

DoesNotContainAll<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

DoesNotContainAll<T>(ReadOnlyMemory<T>, ReadOnlyMemory<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

DoesNotContainAll<T>(IEnumerable<T>, IEnumerable<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity) and throws an exception if every element in notExpected occurs at least as many times in collection.

DoesNotContainAll<T>(Span<T>, Span<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

DoesNotContainAll(IEnumerable, IEnumerable, String, String, String)

Source:
Assert.ContainsAll.cs

Tests whether collection does not contain every element of notExpected (with multiplicity) and throws an exception if every element in notExpected occurs at least as many times in collection.

public static void DoesNotContainAll(System.Collections.IEnumerable? notExpected, System.Collections.IEnumerable? collection, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContainAll : System.Collections.IEnumerable * System.Collections.IEnumerable * string * string * string -> unit
Public Shared Sub DoesNotContainAll (notExpected As IEnumerable, collection As IEnumerable, Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")

Parameters

notExpected
IEnumerable

The collection of items the test expects not to all be present in collection.

collection
IEnumerable

The collection expected not to contain every item of notExpected.

message
String

The message to include in the exception when every element in notExpected is also found (with sufficient multiplicity) in collection. The message is shown in test results.

notExpectedExpression
String

The syntactic expression of notExpected as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

collectionExpression
String

The syntactic expression of collection as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Exceptions

Thrown if every element of notExpected occurs at least as many times in collection.

Remarks

Element multiplicity is significant: [1] is considered not to contain all of [1, 1] (so this assertion would pass for those inputs).

Applies to

DoesNotContainAll(IEnumerable, IEnumerable, IEqualityComparer, String, String, String)

Source:
Assert.ContainsAll.cs

Tests whether collection does not contain every element of notExpected (with multiplicity) and throws an exception if every element in notExpected occurs at least as many times in collection.

public static void DoesNotContainAll(System.Collections.IEnumerable? notExpected, System.Collections.IEnumerable? collection, System.Collections.IEqualityComparer? comparer, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContainAll : System.Collections.IEnumerable * System.Collections.IEnumerable * System.Collections.IEqualityComparer * string * string * string -> unit
Public Shared Sub DoesNotContainAll (notExpected As IEnumerable, collection As IEnumerable, comparer As IEqualityComparer, Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")

Parameters

notExpected
IEnumerable

The collection of items the test expects not to all be present in collection.

collection
IEnumerable

The collection expected not to contain every item of notExpected.

comparer
IEqualityComparer

The equality comparer to use when comparing elements.

message
String

The message to include in the exception when every element in notExpected is also found (with sufficient multiplicity) in collection. The message is shown in test results.

notExpectedExpression
String

The syntactic expression of notExpected as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

collectionExpression
String

The syntactic expression of collection as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Exceptions

Thrown if every element of notExpected occurs at least as many times in collection.

Remarks

Element multiplicity is significant: [1] is considered not to contain all of [1, 1] (so this assertion would pass for those inputs).

Applies to

DoesNotContainAll<T>(Memory<T>, Memory<T>, IEqualityComparer<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

public static void DoesNotContainAll<T>(Memory<T> notExpected, Memory<T> collection, System.Collections.Generic.IEqualityComparer<T>? comparer, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContainAll : Memory<'T> * Memory<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub DoesNotContainAll(Of T) (notExpected As Memory(Of T), collection As Memory(Of T), comparer As IEqualityComparer(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")

Type Parameters

T

The type of the collection items.

Parameters

notExpected
Memory<T>

The memory of items the test expects not to all be present in collection.

collection
Memory<T>

The memory expected not to contain every item of notExpected.

comparer
IEqualityComparer<T>

The equality comparer to use when comparing elements.

message
String

The message to include in the exception when the assertion fails.

notExpectedExpression
String

The syntactic expression of notExpected as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

collectionExpression
String

The syntactic expression of collection as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Applies to

DoesNotContainAll<T>(Span<T>, Span<T>, IEqualityComparer<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

public static void DoesNotContainAll<T>(Span<T> notExpected, Span<T> collection, System.Collections.Generic.IEqualityComparer<T>? comparer, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContainAll : Span<'T> * Span<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub DoesNotContainAll(Of T) (notExpected As Span(Of T), collection As Span(Of T), comparer As IEqualityComparer(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")

Type Parameters

T

The type of the collection items.

Parameters

notExpected
Span<T>

The span of items the test expects not to all be present in collection.

collection
Span<T>

The span expected not to contain every item of notExpected.

comparer
IEqualityComparer<T>

The equality comparer to use when comparing elements.

message
String

The message to include in the exception when the assertion fails.

notExpectedExpression
String

The syntactic expression of notExpected as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

collectionExpression
String

The syntactic expression of collection as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Applies to

DoesNotContainAll<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, IEqualityComparer<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

public static void DoesNotContainAll<T>(ReadOnlySpan<T> notExpected, ReadOnlySpan<T> collection, System.Collections.Generic.IEqualityComparer<T>? comparer, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContainAll : ReadOnlySpan<'T> * ReadOnlySpan<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub DoesNotContainAll(Of T) (notExpected As ReadOnlySpan(Of T), collection As ReadOnlySpan(Of T), comparer As IEqualityComparer(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")

Type Parameters

T

The type of the collection items.

Parameters

notExpected
ReadOnlySpan<T>

The span of items the test expects not to all be present in collection.

collection
ReadOnlySpan<T>

The span expected not to contain every item of notExpected.

comparer
IEqualityComparer<T>

The equality comparer to use when comparing elements.

message
String

The message to include in the exception when the assertion fails.

notExpectedExpression
String

The syntactic expression of notExpected as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

collectionExpression
String

The syntactic expression of collection as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Applies to

DoesNotContainAll<T>(ReadOnlyMemory<T>, ReadOnlyMemory<T>, IEqualityComparer<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

public static void DoesNotContainAll<T>(ReadOnlyMemory<T> notExpected, ReadOnlyMemory<T> collection, System.Collections.Generic.IEqualityComparer<T>? comparer, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContainAll : ReadOnlyMemory<'T> * ReadOnlyMemory<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub DoesNotContainAll(Of T) (notExpected As ReadOnlyMemory(Of T), collection As ReadOnlyMemory(Of T), comparer As IEqualityComparer(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")

Type Parameters

T

The type of the collection items.

Parameters

notExpected
ReadOnlyMemory<T>

The memory of items the test expects not to all be present in collection.

collection
ReadOnlyMemory<T>

The memory expected not to contain every item of notExpected.

comparer
IEqualityComparer<T>

The equality comparer to use when comparing elements.

message
String

The message to include in the exception when the assertion fails.

notExpectedExpression
String

The syntactic expression of notExpected as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

collectionExpression
String

The syntactic expression of collection as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Applies to

DoesNotContainAll<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>, String, String, String)

Source:
Assert.ContainsAll.cs

Tests whether collection does not contain every element of notExpected (with multiplicity) and throws an exception if every element in notExpected occurs at least as many times in collection.

public static void DoesNotContainAll<T>(System.Collections.Generic.IEnumerable<T>? notExpected, System.Collections.Generic.IEnumerable<T>? collection, System.Collections.Generic.IEqualityComparer<T>? comparer, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContainAll : seq<'T> * seq<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub DoesNotContainAll(Of T) (notExpected As IEnumerable(Of T), collection As IEnumerable(Of T), comparer As IEqualityComparer(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")

Type Parameters

T

The type of the collection items.

Parameters

notExpected
IEnumerable<T>

The collection of items the test expects not to all be present in collection.

collection
IEnumerable<T>

The collection expected not to contain every item of notExpected.

comparer
IEqualityComparer<T>

The equality comparer to use when comparing elements.

message
String

The message to include in the exception when every element in notExpected is also found (with sufficient multiplicity) in collection. The message is shown in test results.

notExpectedExpression
String

The syntactic expression of notExpected as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

collectionExpression
String

The syntactic expression of collection as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Exceptions

Thrown if every element of notExpected occurs at least as many times in collection.

Remarks

Element multiplicity is significant: [1] is considered not to contain all of [1, 1] (so this assertion would pass for those inputs).

Applies to

DoesNotContainAll<T>(Memory<T>, Memory<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

public static void DoesNotContainAll<T>(Memory<T> notExpected, Memory<T> collection, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContainAll : Memory<'T> * Memory<'T> * string * string * string -> unit
Public Shared Sub DoesNotContainAll(Of T) (notExpected As Memory(Of T), collection As Memory(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")

Type Parameters

T

The type of the collection items.

Parameters

notExpected
Memory<T>

The memory of items the test expects not to all be present in collection.

collection
Memory<T>

The memory expected not to contain every item of notExpected.

message
String

The message to include in the exception when the assertion fails.

notExpectedExpression
String

The syntactic expression of notExpected as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

collectionExpression
String

The syntactic expression of collection as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Applies to

DoesNotContainAll<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

public static void DoesNotContainAll<T>(ReadOnlySpan<T> notExpected, ReadOnlySpan<T> collection, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContainAll : ReadOnlySpan<'T> * ReadOnlySpan<'T> * string * string * string -> unit
Public Shared Sub DoesNotContainAll(Of T) (notExpected As ReadOnlySpan(Of T), collection As ReadOnlySpan(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")

Type Parameters

T

The type of the collection items.

Parameters

notExpected
ReadOnlySpan<T>

The span of items the test expects not to all be present in collection.

collection
ReadOnlySpan<T>

The span expected not to contain every item of notExpected.

message
String

The message to include in the exception when the assertion fails.

notExpectedExpression
String

The syntactic expression of notExpected as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

collectionExpression
String

The syntactic expression of collection as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Applies to

DoesNotContainAll<T>(ReadOnlyMemory<T>, ReadOnlyMemory<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

public static void DoesNotContainAll<T>(ReadOnlyMemory<T> notExpected, ReadOnlyMemory<T> collection, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContainAll : ReadOnlyMemory<'T> * ReadOnlyMemory<'T> * string * string * string -> unit
Public Shared Sub DoesNotContainAll(Of T) (notExpected As ReadOnlyMemory(Of T), collection As ReadOnlyMemory(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")

Type Parameters

T

The type of the collection items.

Parameters

notExpected
ReadOnlyMemory<T>

The memory of items the test expects not to all be present in collection.

collection
ReadOnlyMemory<T>

The memory expected not to contain every item of notExpected.

message
String

The message to include in the exception when the assertion fails.

notExpectedExpression
String

The syntactic expression of notExpected as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

collectionExpression
String

The syntactic expression of collection as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Applies to

DoesNotContainAll<T>(IEnumerable<T>, IEnumerable<T>, String, String, String)

Source:
Assert.ContainsAll.cs

Tests whether collection does not contain every element of notExpected (with multiplicity) and throws an exception if every element in notExpected occurs at least as many times in collection.

public static void DoesNotContainAll<T>(System.Collections.Generic.IEnumerable<T>? notExpected, System.Collections.Generic.IEnumerable<T>? collection, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContainAll : seq<'T> * seq<'T> * string * string * string -> unit
Public Shared Sub DoesNotContainAll(Of T) (notExpected As IEnumerable(Of T), collection As IEnumerable(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")

Type Parameters

T

The type of the collection items.

Parameters

notExpected
IEnumerable<T>

The collection of items the test expects not to all be present in collection.

collection
IEnumerable<T>

The collection expected not to contain every item of notExpected.

message
String

The message to include in the exception when every element in notExpected is also found (with sufficient multiplicity) in collection. The message is shown in test results.

notExpectedExpression
String

The syntactic expression of notExpected as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

collectionExpression
String

The syntactic expression of collection as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Exceptions

Thrown if every element of notExpected occurs at least as many times in collection.

Remarks

Element multiplicity is significant: [1] is considered not to contain all of [1, 1] (so this assertion would pass for those inputs).

Applies to

DoesNotContainAll<T>(Span<T>, Span<T>, String, String, String)

Tests whether collection does not contain every element of notExpected (with multiplicity).

public static void DoesNotContainAll<T>(Span<T> notExpected, Span<T> collection, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContainAll : Span<'T> * Span<'T> * string * string * string -> unit
Public Shared Sub DoesNotContainAll(Of T) (notExpected As Span(Of T), collection As Span(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")

Type Parameters

T

The type of the collection items.

Parameters

notExpected
Span<T>

The span of items the test expects not to all be present in collection.

collection
Span<T>

The span expected not to contain every item of notExpected.

message
String

The message to include in the exception when the assertion fails.

notExpectedExpression
String

The syntactic expression of notExpected as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

collectionExpression
String

The syntactic expression of collection as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Applies to