Assert.DoesNotContainAll Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| DoesNotContainAll(IEnumerable, IEnumerable, String, String, String) |
Tests whether |
| DoesNotContainAll(IEnumerable, IEnumerable, IEqualityComparer, String, String, String) |
Tests whether |
| DoesNotContainAll<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>, String, String, String) |
Tests whether |
| DoesNotContainAll<T>(IEnumerable<T>, IEnumerable<T>, String, String, String) |
Tests whether |
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>(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>(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).