Team Test API
CollectionAssert Class
Verifies true/false propositions associated with collections in unit tests.
Namespace: Microsoft.VisualStudio.TestTools.UnitTesting
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in microsoft.visualstudio.qualitytools.unittestframework.dll)
Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in microsoft.visualstudio.qualitytools.unittestframework.dll)
Syntax
Visual Basic (Declaration)
Public NotInheritable Class CollectionAssert
Visual Basic (Usage)
The members of a static class are accessed directly without an instance of the class.
C#
public static class CollectionAssert
C++
public ref class CollectionAssert abstract sealed
J#
public final class CollectionAssert
JScript
public final class CollectionAssert
Remarks
This class contains a set of static methods that evaluate a Boolean condition. If this condition evaluates to true, the assertion passes.
An assertion verifies an assumption of truth for compared conditions.
If the condition being verified is not true, the assertion fails.
Important |
|---|
| The CollectionAssert class throws an AssertFailedException to signal a failure. This exception should not be captured. This exception is handled by the unit test engine to indicate an assert failure. |
Inheritance Hierarchy
System.Object Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.See Also
Important