CollectionAssert Methods

Include Protected Members
Include Inherited Members

Methods

  Name Description
Public methodStatic member AllItemsAreInstancesOfType(ICollection, Type) Verifies that all elements in the specified collection are instances of the specified type. The assertion fails if for any element the type is not found in its inheritance hierarchy.
Public methodStatic member AllItemsAreInstancesOfType(ICollection, Type, String) Verifies that all elements in the specified collection are instances of the specified type. The assertion fails if there exists one element in the collection for which the specified type is not found in its inheritance hierarchy. Displays a message if the assertion fails.
Public methodStatic member AllItemsAreInstancesOfType(ICollection, Type, String, array<Object[]) Verifies that all elements in the specified collection are instances of the specified type. The assertion fails if there exists one element in the collection for which the specified type is not found in its inheritance hierarchy. Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member AllItemsAreNotNull(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).
Public methodStatic member AllItemsAreNotNull(ICollection, String) 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). Displays a message if the assertion fails.
Public methodStatic member AllItemsAreNotNull(ICollection, String, array<Object[]) 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). Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member AllItemsAreUnique(ICollection) Verifies that all items in the specified collection are unique. The assertion fails if any two elements in the collection are equal.
Public methodStatic member AllItemsAreUnique(ICollection, String) 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.
Public methodStatic member AllItemsAreUnique(ICollection, String, array<Object[]) 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, and applies the specified formatting to it.
Public methodStatic member AreEqual(ICollection, ICollection) Verifies that two specified collections are equal. The assertion fails if the collections are not equal.
Public methodStatic member AreEqual(ICollection, ICollection, IComparer) Verifies that two specified collections are equal, using the specified method to compare the values of elements. The assertion fails if the collections are not equal.
Public methodStatic member AreEqual(ICollection, ICollection, String) Verifies that two specified collections are equal. The assertion fails if the collections are not equal. Displays a message if the assertion fails.
Public methodStatic member AreEqual(ICollection, ICollection, IComparer, String) Verifies that two specified collections are equal, using the specified method to compare the values of elements. The assertion fails if the collections are not equal. Displays a message if the assertion fails.
Public methodStatic member AreEqual(ICollection, ICollection, String, array<Object[]) Verifies that two specified collections are equal. The assertion fails if the collections are not equal. Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member AreEqual(ICollection, ICollection, IComparer, String, array<Object[]) Verifies that two specified collections are equal, using the specified method to compare the values of elements. The assertion fails if the collections are not equal. Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member AreEquivalent(ICollection, ICollection) Verifies that two specified collections are equivalent. The assertion fails if the collections are not equivalent.
Public methodStatic member AreEquivalent(ICollection, ICollection, String) Verifies that two specified collections are equivalent. The assertion fails if the collections are not equivalent. Displays a message if the assertion fails.
Public methodStatic member AreEquivalent(ICollection, ICollection, String, array<Object[]) Verifies that two specified collections are equivalent. The assertion fails if the collections are not equivalent. Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member AreNotEqual(ICollection, ICollection) Verifies that two specified collections are not equal. The assertion fails if the collections are equal.
Public methodStatic member AreNotEqual(ICollection, ICollection, IComparer) Verifies that two specified collections are not equal, using the specified method to compare the values of elements. The assertion fails if the collections are equal.
Public methodStatic member AreNotEqual(ICollection, ICollection, String) Verifies that two specified collections are not equal. The assertion fails if the collections are equal. Displays a message if the assertion fails.
Public methodStatic member AreNotEqual(ICollection, ICollection, IComparer, String) Verifies that two specified collections are not equal, using the specified method to compare the values of elements. The assertion fails if the collections are equal. Displays a message if the assertion fails.
Public methodStatic member AreNotEqual(ICollection, ICollection, String, array<Object[]) Verifies that two specified collections are not equal. The assertion fails if the collections are equal. Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member AreNotEqual(ICollection, ICollection, IComparer, String, array<Object[]) Verifies that two specified collections are not equal, using the specified method to compare the values of elements. The assertion fails if the collections are equal. Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member AreNotEquivalent(ICollection, ICollection) Verifies that two specified collections are not equivalent. The assertion fails if the collections are equivalent.
Public methodStatic member AreNotEquivalent(ICollection, ICollection, String) Verifies that two specified collections are not equivalent. The assertion fails if the collections are equivalent. Displays a message if the assertion fails.
Public methodStatic member AreNotEquivalent(ICollection, ICollection, String, array<Object[]) Verifies that two specified collections are not equivalent. The assertion fails if the collections are equivalent. Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member Contains(ICollection, Object) Verifies that the specified collection contains the specified element. The assertion fails if the element is not found in the collection.
Public methodStatic member Contains(ICollection, Object, String) Verifies that the specified collection contains the specified element. The assertion fails if the element is not found in the collection. Displays a message if the assertion fails.
Public methodStatic member Contains(ICollection, Object, String, array<Object[]) Verifies that the specified collection contains the specified element. The assertion fails if the element is not found in the collection. Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member DoesNotContain(ICollection, Object) Verifies that the specified collection does not contain the specified element. The assertion fails if the element is found in the collection.
Public methodStatic member DoesNotContain(ICollection, Object, String) Verifies that the specified collection does not contain the specified element. The assertion fails if the element is found in the collection. Displays a message if the assertion fails.
Public methodStatic member DoesNotContain(ICollection, Object, String, array<Object[]) Verifies that the specified collection does not contain the specified element. The assertion fails if the element is found in the collection. Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member IsNotSubsetOf(ICollection, ICollection) Verifies that the first collection is not a subset of the second collection.
Public methodStatic member IsNotSubsetOf(ICollection, ICollection, String) Verifies that the first collection is not a subset of the second collection. Displays a message if the assertion fails.
Public methodStatic member IsNotSubsetOf(ICollection, ICollection, String, array<Object[]) Verifies that the first collection is not a subset of the second collection. Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member IsSubsetOf(ICollection, ICollection) Verifies that the first collection is a subset of the second collection.
Public methodStatic member IsSubsetOf(ICollection, ICollection, String) Verifies that the first collection is a subset of the second collection. Displays a message if the assertion fails.
Public methodStatic member IsSubsetOf(ICollection, ICollection, String, array<Object[]) Verifies that the first collection is a subset of the second collection. Displays a message if the assertion fails, and applies the specified formatting to it.

Top

See Also

Reference

CollectionAssert Class

Microsoft.VisualStudio.TestTools.UnitTesting Namespace