Table of Contents

Class SetAsserts

Namespace
Asserts
Assembly
xunit.v3.assert.dll
public class SetAsserts
Inheritance
SetAsserts
Inherited Members

Methods

Contains<T>(T, HashSet<T>)

Verifies that the hashset contains the given object.

public static void Contains<T>(T expected, HashSet<T> set)

Parameters

expected T

The object expected to be in the set

set HashSet<T>

The set to be inspected

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the object is not present in the set

Contains<T>(T, ISet<T>)

Verifies that the set contains the given object.

public static void Contains<T>(T expected, ISet<T> set)

Parameters

expected T

The object expected to be in the set

set ISet<T>

The set to be inspected

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the object is not present in the set

Contains<T>(T, SortedSet<T>)

Verifies that the sorted hashset contains the given object.

public static void Contains<T>(T expected, SortedSet<T> set)

Parameters

expected T

The object expected to be in the set

set SortedSet<T>

The set to be inspected

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the object is not present in the set

Contains<T>(T, ImmutableHashSet<T>)

Verifies that the immutable hashset contains the given object.

public static void Contains<T>(T expected, ImmutableHashSet<T> set)

Parameters

expected T

The object expected to be in the set

set ImmutableHashSet<T>

The set to be inspected

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the object is not present in the set

Contains<T>(T, ImmutableSortedSet<T>)

Verifies that the immutable sorted hashset contains the given object.

public static void Contains<T>(T expected, ImmutableSortedSet<T> set)

Parameters

expected T

The object expected to be in the set

set ImmutableSortedSet<T>

The set to be inspected

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the object is not present in the set

DoesNotContain<T>(T, HashSet<T>)

Verifies that the hashset does not contain the given item.

public static void DoesNotContain<T>(T expected, HashSet<T> set)

Parameters

expected T

The object expected to be in the set

set HashSet<T>

The set to be inspected

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the object is not present in the set

DoesNotContain<T>(T, ISet<T>)

Verifies that the set does not contain the given item.

public static void DoesNotContain<T>(T expected, ISet<T> set)

Parameters

expected T

The object that is expected not to be in the set

set ISet<T>

The set to be inspected

Type Parameters

T

The type of the object to be compared

Examples

Add an example for this method ?

Contribution guide.

Exceptions

DoesNotContainException

Thrown when the object is present inside the set

DoesNotContain<T>(T, SortedSet<T>)

Verifies that the sorted hashset does not contain the given item.

public static void DoesNotContain<T>(T expected, SortedSet<T> set)

Parameters

expected T

The object expected to be in the set

set SortedSet<T>

The set to be inspected

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the object is not present in the set

DoesNotContain<T>(T, ImmutableHashSet<T>)

Verifies that the immutable hashset does not contain the given item.

public static void DoesNotContain<T>(T expected, ImmutableHashSet<T> set)

Parameters

expected T

The object expected to be in the set

set ImmutableHashSet<T>

The set to be inspected

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the object is not present in the set

DoesNotContain<T>(T, ImmutableSortedSet<T>)

Verifies that the immutable sorted hashset does not contain the given item.

public static void DoesNotContain<T>(T expected, ImmutableSortedSet<T> set)

Parameters

expected T

The object expected to be in the set

set ImmutableSortedSet<T>

The set to be inspected

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the object is not present in the set

ProperSubset<T>(ISet<T>, ISet<T>?)

Verifies that a set is a proper subset of another set.

public static void ProperSubset<T>(ISet<T> expectedSubset, ISet<T>? actual)

Parameters

expectedSubset ISet<T>

The expected subset

actual ISet<T>

The set expected to be a proper subset

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the actual set is not a proper subset of the expected set

ProperSuperset<T>(ISet<T>, ISet<T>?)

Verifies that a set is a proper superset of another set.

public static void ProperSuperset<T>(ISet<T> expectedSuperset, ISet<T>? actual)

Parameters

expectedSuperset ISet<T>

The expected superset

actual ISet<T>

The set expected to be a proper superset

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the actual set is not a proper superset of the expected set

Subset<T>(ISet<T>, ISet<T>?)

Verifies that a set is a subset of another set.

public static void Subset<T>(ISet<T> expectedSubset, ISet<T>? actual)

Parameters

expectedSubset ISet<T>

The expected subset

actual ISet<T>

The set expected to be a subset

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the actual set is not a subset of the expected set

Superset<T>(ISet<T>, ISet<T>?)

Verifies that a set is a superset of another set.

public static void Superset<T>(ISet<T> expectedSuperset, ISet<T>? actual)

Parameters

expectedSuperset ISet<T>

The expected superset

actual ISet<T>

The set expected to be a superset

Type Parameters

T

The type of the object to be verified

Examples

Add an example for this method ?

Contribution guide.

Exceptions

ContainsException

Thrown when the actual set is not a superset of the expected set