CollectionAssert Class
This page is specific to:.NET Framework Version:
2.03.54
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)
Syntax

'Usage

You do not need to declare an instance of a static class in order to access its members.

'Declaration

Public NotInheritable 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.

ms245294.alert_caution(en-us,VS.90).gifImportant Note:

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

Reference

Other Resources

© 2010 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View