Skip to content

ReadOnlySetAssertions<TSet, T> Class

Definition

Provides assertions for read-only set values.

public sealed class ReadOnlySetAssertions<TSet, T> : EnumerableAssertions<TSet, T>
   where TSet : IReadOnlySet<T>

Type Parameters

Name Description
TSet The type of the set being asserted on.
T The type of elements in the set.

Constructors

Name Description
ReadOnlySetAssertions(TSet) Provides assertions for read-only set values.

Methods

Name Description
IsSubsetOf(IEnumerable<T>) Asserts that the set is a subset of the expected elements, i.e. every element in the set is expected.
IsSupersetOf(IEnumerable<T>) Asserts that the set is a superset of the expected elements, i.e. it contains every expected element.
SetEquals(IEnumerable<T>) Asserts that the set contains exactly the expected elements, ignoring order and duplicates.