Mocker..::..AddType<(Of <(<'TInterface, TClass>)>)> Method (Func<(Of <(<'Mocker, TClass>)>)>, Boolean, array<Object>[]()[][])
Adds an interface to Class mapping to the typeMap for easier resolution.
Namespace:
FastMoqAssembly: FastMoq.Core (in FastMoq.Core.dll)
Syntax
Type Parameters
- TInterface
- The interface or class Type which can be mapped to a specific Class.
- TClass
- The Class Type (cannot be an interface) that can be created and assigned to TInterface />.
Exceptions
Exception | Condition |
---|---|
ArgumentException | $"{typeof(TClass).Name} cannot be an interface." |
ArgumentException | $"{typeof(TClass).Name} is not assignable to {typeof(TInterface).Name}." |