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: ICollectionThe 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualStudio.TestTools.UnitTesting Namespace