语言

Assert.DoesNotContainAll 方法

定义

重载

名称 说明
DoesNotContainAll(IEnumerable, IEnumerable, String, String, String)

测试是否collection不包含(具有多重性)的每个元素,如果每个元素notExpectednotExpected至少在发生多次collection时引发异常。

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

测试是否collection不包含(具有多重性)的每个元素,如果每个元素notExpectednotExpected至少在发生多次collection时引发异常。

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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

测试是否collection不包含(具有多重性)的每个元素,如果每个元素notExpectednotExpected至少在发生多次collection时引发异常。

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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

测试是否collection不包含(具有多重性)的每个元素,如果每个元素notExpectednotExpected至少在发生多次collection时引发异常。

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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

Source:
Assert.ContainsAll.cs

测试是否collection不包含(具有多重性)的每个元素,如果每个元素notExpectednotExpected至少在发生多次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 = "")

参数

notExpected
IEnumerable

测试期望的项集合不会全部存在于 collection其中。

collection
IEnumerable

集合不应包含每个项。notExpected

message
String

在找到每个元素 notExpected 时(具有足够多重性)时,要包含在异常中的 collection消息。 消息显示在测试结果中。

notExpectedExpression
String

由编译器通过调用方参数表达式给出的 notExpectic 表达式的语法表达式。 用户不应传递此参数的值。

collectionExpression
String

编译器通过调用方参数表达式提供的集合的语法表达式。 用户不应传递此参数的值。

例外

如果每个元素 notExpected 在中 collection发生次数至少为一次,则引发 。

注解

元素多重性非常重要: [1] 被视为不包含所有 [1, 1] 元素(因此此断言会为这些输入传递)。

适用于

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

Source:
Assert.ContainsAll.cs

测试是否collection不包含(具有多重性)的每个元素,如果每个元素notExpectednotExpected至少在发生多次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 = "")

参数

notExpected
IEnumerable

测试期望的项集合不会全部存在于 collection其中。

collection
IEnumerable

集合不应包含每个项。notExpected

comparer
IEqualityComparer

比较元素时要使用的相等比较器。

message
String

在找到每个元素 notExpected 时(具有足够多重性)时,要包含在异常中的 collection消息。 消息显示在测试结果中。

notExpectedExpression
String

由编译器通过调用方参数表达式给出的 notExpectic 表达式的语法表达式。 用户不应传递此参数的值。

collectionExpression
String

编译器通过调用方参数表达式提供的集合的语法表达式。 用户不应传递此参数的值。

例外

如果每个元素 notExpected 在中 collection发生次数至少为一次,则引发 。

注解

元素多重性非常重要: [1] 被视为不包含所有 [1, 1] 元素(因此此断言会为这些输入传递)。

适用于

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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 = "")

类型参数

T

集合项的类型。

参数

notExpected
Memory<T>

测试期望的项的内存不会全部存在于 collection其中。

collection
Memory<T>

应不包含每个项的 notExpected内存。

comparer
IEqualityComparer<T>

比较元素时要使用的相等比较器。

message
String

断言失败时要包含在异常中的消息。

notExpectedExpression
String

由编译器通过调用方参数表达式给出的 notExpectic 表达式的语法表达式。 用户不应传递此参数的值。

collectionExpression
String

编译器通过调用方参数表达式提供的集合的语法表达式。 用户不应传递此参数的值。

适用于

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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 = "")

类型参数

T

集合项的类型。

参数

notExpected
Span<T>

测试期望的项范围不会全部存在于 collection其中。

collection
Span<T>

不应包含每个项的 notExpected跨度。

comparer
IEqualityComparer<T>

比较元素时要使用的相等比较器。

message
String

断言失败时要包含在异常中的消息。

notExpectedExpression
String

由编译器通过调用方参数表达式给出的 notExpectic 表达式的语法表达式。 用户不应传递此参数的值。

collectionExpression
String

编译器通过调用方参数表达式提供的集合的语法表达式。 用户不应传递此参数的值。

适用于

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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 = "")

类型参数

T

集合项的类型。

参数

notExpected
ReadOnlySpan<T>

测试期望的项范围不会全部存在于 collection其中。

collection
ReadOnlySpan<T>

不应包含每个项的 notExpected跨度。

comparer
IEqualityComparer<T>

比较元素时要使用的相等比较器。

message
String

断言失败时要包含在异常中的消息。

notExpectedExpression
String

由编译器通过调用方参数表达式给出的 notExpectic 表达式的语法表达式。 用户不应传递此参数的值。

collectionExpression
String

编译器通过调用方参数表达式提供的集合的语法表达式。 用户不应传递此参数的值。

适用于

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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 = "")

类型参数

T

集合项的类型。

参数

notExpected
ReadOnlyMemory<T>

测试期望的项的内存不会全部存在于 collection其中。

collection
ReadOnlyMemory<T>

应不包含每个项的 notExpected内存。

comparer
IEqualityComparer<T>

比较元素时要使用的相等比较器。

message
String

断言失败时要包含在异常中的消息。

notExpectedExpression
String

由编译器通过调用方参数表达式给出的 notExpectic 表达式的语法表达式。 用户不应传递此参数的值。

collectionExpression
String

编译器通过调用方参数表达式提供的集合的语法表达式。 用户不应传递此参数的值。

适用于

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

Source:
Assert.ContainsAll.cs

测试是否collection不包含(具有多重性)的每个元素,如果每个元素notExpectednotExpected至少在发生多次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 = "")

类型参数

T

集合项的类型。

参数

notExpected
IEnumerable<T>

测试期望的项集合不会全部存在于 collection其中。

collection
IEnumerable<T>

集合不应包含每个项。notExpected

comparer
IEqualityComparer<T>

比较元素时要使用的相等比较器。

message
String

在找到每个元素 notExpected 时(具有足够多重性)时,要包含在异常中的 collection消息。 消息显示在测试结果中。

notExpectedExpression
String

由编译器通过调用方参数表达式给出的 notExpectic 表达式的语法表达式。 用户不应传递此参数的值。

collectionExpression
String

编译器通过调用方参数表达式提供的集合的语法表达式。 用户不应传递此参数的值。

例外

如果每个元素 notExpected 在中 collection发生次数至少为一次,则引发 。

注解

元素多重性非常重要: [1] 被视为不包含所有 [1, 1] 元素(因此此断言会为这些输入传递)。

适用于

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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 = "")

类型参数

T

集合项的类型。

参数

notExpected
Memory<T>

测试期望的项的内存不会全部存在于 collection其中。

collection
Memory<T>

应不包含每个项的 notExpected内存。

message
String

断言失败时要包含在异常中的消息。

notExpectedExpression
String

由编译器通过调用方参数表达式给出的 notExpectic 表达式的语法表达式。 用户不应传递此参数的值。

collectionExpression
String

编译器通过调用方参数表达式提供的集合的语法表达式。 用户不应传递此参数的值。

适用于

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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 = "")

类型参数

T

集合项的类型。

参数

notExpected
ReadOnlySpan<T>

测试期望的项范围不会全部存在于 collection其中。

collection
ReadOnlySpan<T>

不应包含每个项的 notExpected跨度。

message
String

断言失败时要包含在异常中的消息。

notExpectedExpression
String

由编译器通过调用方参数表达式给出的 notExpectic 表达式的语法表达式。 用户不应传递此参数的值。

collectionExpression
String

编译器通过调用方参数表达式提供的集合的语法表达式。 用户不应传递此参数的值。

适用于

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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 = "")

类型参数

T

集合项的类型。

参数

notExpected
ReadOnlyMemory<T>

测试期望的项的内存不会全部存在于 collection其中。

collection
ReadOnlyMemory<T>

应不包含每个项的 notExpected内存。

message
String

断言失败时要包含在异常中的消息。

notExpectedExpression
String

由编译器通过调用方参数表达式给出的 notExpectic 表达式的语法表达式。 用户不应传递此参数的值。

collectionExpression
String

编译器通过调用方参数表达式提供的集合的语法表达式。 用户不应传递此参数的值。

适用于

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

Source:
Assert.ContainsAll.cs

测试是否collection不包含(具有多重性)的每个元素,如果每个元素notExpectednotExpected至少在发生多次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 = "")

类型参数

T

集合项的类型。

参数

notExpected
IEnumerable<T>

测试期望的项集合不会全部存在于 collection其中。

collection
IEnumerable<T>

集合不应包含每个项。notExpected

message
String

在找到每个元素 notExpected 时(具有足够多重性)时,要包含在异常中的 collection消息。 消息显示在测试结果中。

notExpectedExpression
String

由编译器通过调用方参数表达式给出的 notExpectic 表达式的语法表达式。 用户不应传递此参数的值。

collectionExpression
String

编译器通过调用方参数表达式提供的集合的语法表达式。 用户不应传递此参数的值。

例外

如果每个元素 notExpected 在中 collection发生次数至少为一次,则引发 。

注解

元素多重性非常重要: [1] 被视为不包含所有 [1, 1] 元素(因此此断言会为这些输入传递)。

适用于

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

测试是否 collection 不包含每个元素 notExpected (具有多重性)。

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 = "")

类型参数

T

集合项的类型。

参数

notExpected
Span<T>

测试期望的项范围不会全部存在于 collection其中。

collection
Span<T>

不应包含每个项的 notExpected跨度。

message
String

断言失败时要包含在异常中的消息。

notExpectedExpression
String

由编译器通过调用方参数表达式给出的 notExpectic 表达式的语法表达式。 用户不应传递此参数的值。

collectionExpression
String

编译器通过调用方参数表达式提供的集合的语法表达式。 用户不应传递此参数的值。

适用于