CollectionAssert.AllItemsAreUnique Method (ICollection, String)
Visual Studio 2012
Verifies that all items in the specified collection are unique. The assertion fails if any two elements in the collection are equal. Displays a message if the assertion fails.
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
| Exception | Condition |
|---|---|
| AssertFailedException | Two or more equal elements are found in collection. |
- 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.