Поделиться через


Assert.IsNotEmpty Method

Definition

Overloads

IsNotEmpty<T>(IEnumerable<T>)

Tests that the collection is not empty.

IsNotEmpty<T>(IEnumerable<T>, Assert.AssertIsNotEmptyInterpolatedStringHandler<T>)

Tests that the collection is not empty.

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

Tests whether the collection is not empty.

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

Tests that the collection is not empty.

IsNotEmpty<T>(IEnumerable<T>)

Source:
Assert.Count.cs

Tests that the collection is not empty.

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

Type Parameters

T

The type of the items of the collection.

Parameters

collection
IEnumerable<T>

The collection.

Applies to

IsNotEmpty<T>(IEnumerable<T>, Assert.AssertIsNotEmptyInterpolatedStringHandler<T>)

Source:
Assert.Count.cs

Tests that the collection is not empty.

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

Type Parameters

T

The type of the collection items.

Parameters

collection
IEnumerable<T>

The collection.

message
Assert.AssertIsNotEmptyInterpolatedStringHandler<T>

The message to display when the assertion fails.

Applies to

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

Source:
Assert.Count.cs

Tests whether the collection is not empty.

public static void IsNotEmpty<T> (System.Collections.Generic.IEnumerable<T> collection, string? message);
static member IsNotEmpty : seq<'T> * string -> unit
Public Shared Sub IsNotEmpty(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

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

Source:
Assert.Count.cs

Tests that the collection is not empty.

public static void IsNotEmpty<T> (System.Collections.Generic.IEnumerable<T> collection, string? message, params object?[]? parameters);
static member IsNotEmpty : seq<'T> * string * obj[] -> unit
Public Shared Sub IsNotEmpty(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