語言

Assert.DoesNotContainAll 方法

定義

多載

名稱 Description
DoesNotContainAll(IEnumerable, IEnumerable, String, String, String)

測試 collection 是否包含 的 notExpected 每個元素(具有重重性),若 中的 notExpected 每個元素至少出現於 中 collection次數相同,則拋出例外。

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

測試 collection 是否包含 的 notExpected 每個元素(具有重重性),若 中的 notExpected 每個元素至少出現於 中 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 是否包含 的 notExpected 每個元素(具有重重性),若 中的 notExpected 每個元素至少出現於 中 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 是否包含 的 notExpected 每個元素(具有重重性),若 中的 notExpected 每個元素至少出現於 中 collection次數相同,則拋出例外。

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

測試 collection 是否包含所有 notExpected 元素(具有重數)。

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

來源:
Assert.ContainsAll.cs

測試 collection 是否包含 的 notExpected 每個元素(具有重重性),若 中的 notExpected 每個元素至少出現於 中 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

notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。

collectionExpression
String

由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。

例外狀況

若 的 notExpected 每個元素在 中 collection出現次數至少相同,則 擲出。

備註

元素多重性很重要: [1] 被認為不包含全部 [1, 1] (因此此斷言適用於這些輸入)。

適用於

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

來源:
Assert.ContainsAll.cs

測試 collection 是否包含 的 notExpected 每個元素(具有重重性),若 中的 notExpected 每個元素至少出現於 中 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

notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。

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

notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。

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

notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。

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

notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。

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

notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。

collectionExpression
String

由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。

適用於

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

來源:
Assert.ContainsAll.cs

測試 collection 是否包含 的 notExpected 每個元素(具有重重性),若 中的 notExpected 每個元素至少出現於 中 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

notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。

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

notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。

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

notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。

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

notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。

collectionExpression
String

由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。

適用於

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

來源:
Assert.ContainsAll.cs

測試 collection 是否包含 的 notExpected 每個元素(具有重重性),若 中的 notExpected 每個元素至少出現於 中 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

notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。

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

notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。

collectionExpression
String

由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。

適用於