Condividi tramite


CollectionAssert.AllItemsAreNotNull Method (ICollection)

Verifies that all items in the specified collection are not nulla null reference (Nothing in Visual Basic). The assertion fails if any element is nulla null reference (Nothing in Visual Basic).

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Syntax

'Declaration
Public Shared Sub AllItemsAreNotNull ( _
    collection As ICollection _
)
public static void AllItemsAreNotNull(
    ICollection collection
)
public:
static void AllItemsAreNotNull(
    ICollection^ collection
)
static member AllItemsAreNotNull : 
        collection:ICollection -> unit
public static function AllItemsAreNotNull(
    collection : ICollection
)

Parameters

  • collection
    Type: ICollection

    The collection in which to search for elements that are nulla null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
AssertFailedException

An element which is nulla null reference (Nothing in Visual Basic) is found in collection.

.NET Framework Security

See Also

Reference

CollectionAssert Class

AllItemsAreNotNull Overload

Microsoft.VisualStudio.TestTools.UnitTesting Namespace

Other Resources

Using the Assert Classes