Defines a collection of distinct object instances that are expected to be inconditionally accepted as
valid input by the tested setter. Feeding that contract property with at least one value is mandatory.
Namespace:
MbUnit.Framework.ContractVerifiersAssembly: MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.610.0)
Syntax
| C# |
|---|
public DistinctInstanceCollection<TValue> ValidValues { get; set; } |
| Visual Basic (Declaration) |
|---|
Public Property ValidValues As DistinctInstanceCollection(Of TValue) |
Examples
The following example shows how to specify some valid values for the contract verifier:
CopyC#
[TestFixture] public class FooTest { [VerifyContract] public readonly IContract MyPropertyAccessorTests = new AccessorContract<Foo, int> { PropertyName = "MyProperty", ValidValues = { 123, 456, 789 }, }; }
