Assembly: MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.610.0)
Syntax
| C# |
|---|
public class InvalidValuesClassCollection<T> : IEnumerable<InvalidValuesClass<T>>, IEnumerable |
| Visual Basic (Declaration) |
|---|
Public Class InvalidValuesClassCollection(Of T) _ Implements IEnumerable(Of InvalidValuesClass(Of T)), IEnumerable |
Type Parameters
- T
- The type of the object instances in the inner class collections.
Remarks
Distinct invalid instances are used by some contract verifiers such as AccessorContract<(Of <(TTarget, TValue>)>) to check for the correct detection of invalid or unexpected value assignment.
Use the default constructor to create an empty collection, then use the
Add(Type, array<T>[]()[]) method, either explicitely.
CopyC#var collection = new InvalidValuesClassCollection<Foo>();
collection.Add(typeof(ArgumentException), new Foo(1), new Foo(2));
collection.Add(typeof(ArgumentOutOfRangeException), new Foo(3));
CopyC#var collection = new InvalidValuesClassCollection<Foo>
{
{ typeof(ArgumentException), new Foo(1), new Foo(2) },
{ typeof(ArgumentOutOfRangeException), new Foo(3) }
};
