次の方法で共有


Assert.IsEmpty Method

Definition

Overloads

IsEmpty<T>(IEnumerable<T>)

Tests that the collection is empty.

IsEmpty<T>(IEnumerable<T>, Assert.AssertCountInterpolatedStringHandler<T>)

Tests that the collection is empty.

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

Tests that the collection is empty.

IsEmpty<T>(IEnumerable<T>, String, Object[])

Tests that the collection is empty.

IsEmpty<T>(IEnumerable<T>)

Source:
Assert.Count.cs

Tests that the collection is empty.

public static void IsEmpty<T> (System.Collections.Generic.IEnumerable<T> collection);
static member IsEmpty : seq<'T> -> unit
Public Shared Sub IsEmpty(Of T) (collection As IEnumerable(Of T))

Type Parameters

T

The type of the collection items.

Parameters

collection
IEnumerable<T>

The collection.

Applies to

IsEmpty<T>(IEnumerable<T>, Assert.AssertCountInterpolatedStringHandler<T>)

Source:
Assert.Count.cs

Tests that the collection is empty.

public static void IsEmpty<T> (System.Collections.Generic.IEnumerable<T> collection, ref Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertCountInterpolatedStringHandler<T> message);
static member IsEmpty : seq<'T> * AssertCountInterpolatedStringHandler -> unit
Public Shared Sub IsEmpty(Of T) (collection As IEnumerable(Of T), ByRef message As Assert.AssertCountInterpolatedStringHandler(Of T))

Type Parameters

T

The type of the collection items.

Parameters

collection
IEnumerable<T>

The collection.

message
Assert.AssertCountInterpolatedStringHandler<T>

The message to display when the assertion fails.

Applies to

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

Source:
Assert.Count.cs

Tests that the collection is empty.

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

Type Parameters

T

The type of the collection items.

Parameters

collection
IEnumerable<T>

The collection.

message
String

The message to display when the assertion fails.

Applies to

IsEmpty<T>(IEnumerable<T>, String, Object[])

Source:
Assert.Count.cs

Tests that the collection is empty.

public static void IsEmpty<T> (System.Collections.Generic.IEnumerable<T> collection, string? message, params object?[]? parameters);
static member IsEmpty : seq<'T> * string * obj[] -> unit
Public Shared Sub IsEmpty(Of T) (collection As IEnumerable(Of T), message As String, ParamArray parameters As Object())

Type Parameters

T

The type of the collection items.

Parameters

collection
IEnumerable<T>

The collection.

message
String

The message format to display when the assertion fails.

parameters
Object[]

The parameters to format the message.

Applies to