Assembly: MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.610.0)
Syntax
| C# |
|---|
public class EquivalenceClassCollection : IEnumerable<EquivalenceClass>, IEnumerable |
| Visual Basic (Declaration) |
|---|
Public Class EquivalenceClassCollection _ Implements IEnumerable(Of EquivalenceClass), IEnumerable |
Remarks
Equivalent classes are used by some contract verifiers such as EqualityContract<(Of <(TTarget>)>) and ComparisonContract<(Of <(TTarget>)>) to check for the correct implementation of object equality or comparison.
Use the default constructor followed by a list initializer to create a
collection of equivalence classes which contains a variable number of object instances.
CopyC#var collection = new EquivalenceClassCollection
{
{ new Foo(1), new Foo("One") },
{ new Foo(2), new Foo("Two") },
{ new Foo(3), new Foo("Three") }
};
Use the single-parameter constructor to create a collection of equivalence classes
which contains one single object instance each.
CopyC#var collection = new EquivalenceClassCollection(new Foo(1), new Foo(2), new Foo(3));
Inheritance Hierarchy
MbUnit.Framework.ContractVerifiers..::.EquivalenceClassCollection
