Joutsen  v0.4.1
Static Public Member Functions | List of all members
Joutsen.NUnit3.HasElements Class Reference

A factory class with methods that conveniently create constraints for sequence comparison. More...

Static Public Member Functions

static SequencesEqualConstraint< TElement > EqualTo< TElement > (IEnumerable< TElement > expected, IEqualityComparer comparer)
 Creates a constraint that checks if a sequence is equal to the expected sequence. More...
 
static SequencesEqualConstraint< TElement > EqualTo< TElement > (IEnumerable< TElement > expected, IEqualityComparer< TElement > comparer)
 Creates a constraint that checks if a sequence is equal to the expected sequence. More...
 
static SequencesEquivalentConstraint< TElement > EquivalentTo< TElement > (IEnumerable< TElement > expected, IEqualityComparer comparer)
 Creates a constraint that checks if a sequence is equivalent to the expected sequence. More...
 
static SequencesEquivalentConstraint< TElement > EquivalentTo< TElement > (IEnumerable< TElement > expected, IEqualityComparer< TElement > comparer)
 Creates a constraint that checks if a sequence is equivalent to the expected sequence. More...
 

Detailed Description

A factory class with methods that conveniently create constraints for sequence comparison.

Since
0.2.1

Member Function Documentation

◆ EqualTo< TElement >() [1/2]

static SequencesEqualConstraint<TElement> Joutsen.NUnit3.HasElements.EqualTo< TElement > ( IEnumerable< TElement >  expected,
IEqualityComparer  comparer 
)
static

Creates a constraint that checks if a sequence is equal to the expected sequence.

Template Parameters
TElementthe type of the items
Parameters
expectedthe expected sequence used for evaluation of the constraint
comparerthe comparer instance to use for item comparison
Returns
a new instance of Framework.NUnit3.SequencesEqualConstraint for the expected sequence

◆ EqualTo< TElement >() [2/2]

static SequencesEqualConstraint<TElement> Joutsen.NUnit3.HasElements.EqualTo< TElement > ( IEnumerable< TElement >  expected,
IEqualityComparer< TElement >  comparer 
)
static

Creates a constraint that checks if a sequence is equal to the expected sequence.

Template Parameters
TElementthe type of the items
Parameters
expectedthe expected sequence used for evaluation of the constraint
comparerthe comparer instance to use for item comparison
Returns
a new instance of Framework.NUnit3.SequencesEqualConstraint for the expected sequence

◆ EquivalentTo< TElement >() [1/2]

static SequencesEquivalentConstraint<TElement> Joutsen.NUnit3.HasElements.EquivalentTo< TElement > ( IEnumerable< TElement >  expected,
IEqualityComparer  comparer 
)
static

Creates a constraint that checks if a sequence is equivalent to the expected sequence.

Template Parameters
TElementthe type of the items
Parameters
expectedthe expected sequence used for evaluation of the constraint
comparerthe comparer instance to use for item comparison
Returns
a new instance of Framework.NUnit3.SequencesEquivalentConstraint for the expected sequence

◆ EquivalentTo< TElement >() [2/2]

static SequencesEquivalentConstraint<TElement> Joutsen.NUnit3.HasElements.EquivalentTo< TElement > ( IEnumerable< TElement >  expected,
IEqualityComparer< TElement >  comparer 
)
static

Creates a constraint that checks if a sequence is equivalent to the expected sequence.

Template Parameters
TElementthe type of the items
Parameters
expectedthe expected sequence used for evaluation of the constraint
comparerthe comparer instance to use for item comparison
Returns
a new instance of Framework.NUnit3.SequencesEquivalentConstraint for the expected sequence