Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CollectionAssert.IsNotSubsetOf Method (ICollection, ICollection, String)

 

Verifies that the first collection is not a subset of the second collection. Displays a message if the assertion fails.

Namespace:   Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

public static void IsNotSubsetOf(
	ICollection subset,
	ICollection superset,
	string message
)

Parameters

subset
Type: System.Collections.ICollection

The collection not expected to be a subset of superset.

superset
Type: System.Collections.ICollection

The collection not expected to be a superset of subset.

message
Type: System.String

A message to display if the assertion fails. This message can be seen in the unit test results.

Exception Condition
AssertFailedException

All elements in subset are found in superset and are found in sufficient quantity.

One collection is a subset of another collection if every element in the first collection also appears in the second collection. An element that appears in the first collection more than once must appear in the second collection as many times, or more, as it does in the first collection. The second collection may have elements that are not in the first collection, but that is not required.

Return to top
Show: