Class AutoFixtureValuesHandler
CallHandler for NSubstitute to provide auto-values from AutoFixture. It resolves return values and sets ref/out parameter values obtained from ICallResultResolver. Uses cache to resolve value only once per call with specified args.
Inheritance
System.Object
AutoFixtureValuesHandler
Namespace: AutoFixture.AutoNSubstitute.CustomCallHandler
Assembly: AutoFixture.AutoNSubstitute.dll
Syntax
public class AutoFixtureValuesHandler : ICallHandler
Constructors
| Improve this Doc View SourceAutoFixtureValuesHandler(ICallResultResolver, ICallResultCache, ICallSpecificationFactory)
Initializes a new instance of AutoFixtureValuesHandler with related specimen context, results cache and specification factory.
Declaration
public AutoFixtureValuesHandler(ICallResultResolver resultResolver, ICallResultCache resultCache, ICallSpecificationFactory callSpecificationFactory)
Parameters
Type | Name | Description |
---|---|---|
ICallResultResolver | resultResolver | |
ICallResultCache | resultCache | |
ICallSpecificationFactory | callSpecificationFactory |
Properties
| Improve this Doc View SourceCallSpecificationFactory
Factory for the
Declaration
public ICallSpecificationFactory CallSpecificationFactory { get; }
Property Value
Type | Description |
---|---|
ICallSpecificationFactory |
ResultCache
Cache used to store the already resolved call results.
Declaration
public ICallResultCache ResultCache { get; }
Property Value
Type | Description |
---|---|
ICallResultCache |
ResultResolver
Resolver used to obtain call result if not present in cache.
Declaration
public ICallResultResolver ResultResolver { get; }
Property Value
Type | Description |
---|---|
ICallResultResolver |
Methods
| Improve this Doc View SourceHandle(ICall)
Try to handle the call - set ref/out params and return value.
Declaration
public RouteAction Handle(ICall call)
Parameters
Type | Name | Description |
---|---|---|
ICall | call |
Returns
Type | Description |
---|---|
RouteAction |