Skip to content

ReadOnlySetAssertions<TSet, T> Class ​

Definition ​

Provides assertions for read-only set values.

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

View source

Type Parameters ​

NameDescription
TSetThe type of the set being asserted on.
TThe type of elements in the set.

Constructors ​

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

Methods ​

NameDescription
IsSubsetOf(IEnumerable<T>)Asserts that every element in the set is expected.
IsSupersetOf(IEnumerable<T>)Asserts that the set contains every expected element.
SetEquals(IEnumerable<T>)Asserts that the set contains exactly the expected elements, ignoring order and duplicates.