CollectionAssert.IsNotSubsetOf Method (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.

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

Syntax

'Declaration
Public Shared Sub IsNotSubsetOf ( _
    subset As ICollection, _
    superset As ICollection, _
    message As String, _
    ParamArray parameters As Object() _
)
'Usage
Dim subset As ICollection 
Dim superset As ICollection 
Dim message As String 
Dim parameters As Object()

CollectionAssert.IsNotSubsetOf(subset, superset, _
    message, parameters)
public static void IsNotSubsetOf(
    ICollection subset,
    ICollection superset,
    string message,
    params Object[] parameters
)
public:
static void IsNotSubsetOf(
    ICollection^ subset, 
    ICollection^ superset, 
    String^ message, 
    ... array<Object^>^ parameters
)
public static function IsNotSubsetOf(
    subset : ICollection, 
    superset : ICollection, 
    message : String, 
    ... parameters : Object[]
)

Parameters

  • message
    Type: System.String

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

  • parameters
    Type: array<System.Object[]

    An array of parameters to use when formatting message.

Exceptions

Exception Condition
AssertFailedException

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

Remarks

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.

.NET Framework Security

See Also

Reference

CollectionAssert Class

CollectionAssert Members

IsNotSubsetOf Overload

Microsoft.VisualStudio.TestTools.UnitTesting Namespace

Other Resources

Using the Assert Classes