Language

Assert.IsEmpty Method

Definition

Overloads

Name Description
IsEmpty(IEnumerable)

Tests that the collection is empty.

IsEmpty(IEnumerable, String)

Tests that the collection is empty.

IsEmpty(IEnumerable, String, String)

Tests that the collection is empty.

IsEmpty<T>(Span<T>, Assert.AssertCountInterpolatedStringHandler<T>, String)

Tests that the span is empty.

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

Tests that the span is empty.

IsEmpty<T>(ReadOnlySpan<T>, Assert.AssertCountInterpolatedStringHandler<T>, String)

Tests that the span is empty.

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

Tests that the memory is empty.

IsEmpty<T>(ReadOnlyMemory<T>, Assert.AssertCountInterpolatedStringHandler<T>, String)

Tests that the memory is empty.

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

Tests that the memory is empty.

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

Tests that the span is empty.

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

Tests that the collection is empty.

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

Tests that the collection is empty.

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

Tests that the collection is empty.

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

Tests that the collection is empty.

IsEmpty<T>(Memory<T>, Assert.AssertCountInterpolatedStringHandler<T>, String)

Tests that the memory is empty.

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

Tests that the collection is empty.

IsEmpty<T>(IEnumerable<T>)

Tests that the collection is empty.

IsEmpty(IEnumerable)

Source:
Assert.Count.cs

Tests that the collection is empty.

public static void IsEmpty(System.Collections.IEnumerable collection);
static member IsEmpty : System.Collections.IEnumerable -> unit
Public Shared Sub IsEmpty (collection As IEnumerable)

Parameters

collection
IEnumerable

The collection.

Applies to

IsEmpty(IEnumerable, String)

Source:
Assert.Count.cs

Tests that the collection is empty.

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

Parameters

collection
IEnumerable

The collection.

message
String

The message format to display when the assertion fails.

Applies to

IsEmpty(IEnumerable, String, String)

Source:
Assert.Count.cs
Source:
Assert.Count.cs
Source:
Assert.Count.cs
Source:
Assert.IsEmpty.cs

Tests that the collection is empty.

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

Parameters

collection
IEnumerable

The collection.

message
String

The message to display when the assertion fails.

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

IsEmpty<T>(Span<T>, Assert.AssertCountInterpolatedStringHandler<T>, String)

Tests that the span is empty.

public static void IsEmpty<T>(Span<T> collection, ref Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertCountInterpolatedStringHandler<T> message, string collectionExpression = "");
static member IsEmpty : Span<'T> * AssertCountInterpolatedStringHandler * string -> unit
Public Shared Sub IsEmpty(Of T) (collection As Span(Of T), ByRef message As Assert.AssertCountInterpolatedStringHandler(Of T), Optional collectionExpression As String = "")

Type Parameters

T

The type of the span items.

Parameters

collection
Span<T>

The span.

message
Assert.AssertCountInterpolatedStringHandler<T>

The message to display when the assertion fails.

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

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

Tests that the span is empty.

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

Type Parameters

T

The type of the span items.

Parameters

collection
Span<T>

The span.

message
String

The message to display when the assertion fails.

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

IsEmpty<T>(ReadOnlySpan<T>, Assert.AssertCountInterpolatedStringHandler<T>, String)

Tests that the span is empty.

public static void IsEmpty<T>(ReadOnlySpan<T> collection, ref Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertCountInterpolatedStringHandler<T> message, string collectionExpression = "");
static member IsEmpty : ReadOnlySpan<'T> * AssertCountInterpolatedStringHandler * string -> unit
Public Shared Sub IsEmpty(Of T) (collection As ReadOnlySpan(Of T), ByRef message As Assert.AssertCountInterpolatedStringHandler(Of T), Optional collectionExpression As String = "")

Type Parameters

T

The type of the span items.

Parameters

collection
ReadOnlySpan<T>

The span.

message
Assert.AssertCountInterpolatedStringHandler<T>

The message to display when the assertion fails.

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

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

Tests that the memory is empty.

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

Type Parameters

T

The type of the memory items.

Parameters

collection
ReadOnlyMemory<T>

The memory.

message
String

The message to display when the assertion fails.

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

IsEmpty<T>(ReadOnlyMemory<T>, Assert.AssertCountInterpolatedStringHandler<T>, String)

Tests that the memory is empty.

public static void IsEmpty<T>(ReadOnlyMemory<T> collection, ref Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertCountInterpolatedStringHandler<T> message, string collectionExpression = "");
static member IsEmpty : ReadOnlyMemory<'T> * AssertCountInterpolatedStringHandler * string -> unit
Public Shared Sub IsEmpty(Of T) (collection As ReadOnlyMemory(Of T), ByRef message As Assert.AssertCountInterpolatedStringHandler(Of T), Optional collectionExpression As String = "")

Type Parameters

T

The type of the memory items.

Parameters

collection
ReadOnlyMemory<T>

The memory.

message
Assert.AssertCountInterpolatedStringHandler<T>

The message to display when the assertion fails.

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

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

Tests that the memory is empty.

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

Type Parameters

T

The type of the memory items.

Parameters

collection
Memory<T>

The memory.

message
String

The message to display when the assertion fails.

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

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

Tests that the span is empty.

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

Type Parameters

T

The type of the span items.

Parameters

collection
ReadOnlySpan<T>

The span.

message
String

The message to display when the assertion fails.

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

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

Source:
Assert.Count.cs
Source:
Assert.Count.cs
Source:
Assert.Count.cs
Source:
Assert.IsEmpty.cs

Tests that the collection is empty.

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

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

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

Source:
Assert.Count.cs
Source:
Assert.Count.cs
Source:
Assert.Count.cs
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

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

Source:
Assert.Count.cs
Source:
Assert.Count.cs
Source:
Assert.Count.cs
Source:
Assert.IsEmpty.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, string collectionExpression = "");
static member IsEmpty : seq<'T> * AssertCountInterpolatedStringHandler * string -> unit
Public Shared Sub IsEmpty(Of T) (collection As IEnumerable(Of T), ByRef message As Assert.AssertCountInterpolatedStringHandler(Of T), Optional collectionExpression As String = "")

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.

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

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

Source:
Assert.Count.cs
Source:
Assert.Count.cs
Source:
Assert.Count.cs
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>(Memory<T>, Assert.AssertCountInterpolatedStringHandler<T>, String)

Tests that the memory is empty.

public static void IsEmpty<T>(Memory<T> collection, ref Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertCountInterpolatedStringHandler<T> message, string collectionExpression = "");
static member IsEmpty : Memory<'T> * AssertCountInterpolatedStringHandler * string -> unit
Public Shared Sub IsEmpty(Of T) (collection As Memory(Of T), ByRef message As Assert.AssertCountInterpolatedStringHandler(Of T), Optional collectionExpression As String = "")

Type Parameters

T

The type of the memory items.

Parameters

collection
Memory<T>

The memory.

message
Assert.AssertCountInterpolatedStringHandler<T>

The message to display when the assertion fails.

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

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

Source:
Assert.Count.cs
Source:
Assert.Count.cs
Source:
Assert.Count.cs
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>)

Source:
Assert.Count.cs
Source:
Assert.Count.cs
Source:
Assert.Count.cs
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