Class MockConstructorQuery
Namespace: AutoFixture.AutoMoq
Assembly: AutoFixture.AutoMoq.dll
Selects appropriate constructors to create Mock%601 instances.
public class MockConstructorQuery : IMethodQueryInheritance
Implements
IMethodQuery
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
MockConstructorQuery()
public MockConstructorQuery()Methods
SelectMethods(Type)
Selects constructors for the supplied Mock%601 type.
public IEnumerable<IMethod> SelectMethods(Type type)Parameters
type Type
The mock type.
Returns
IEnumerable<IMethod>
Constructors for type.
Remarks
This method only returns constructors if type is a
`Mock%601` type. If not, an empty sequence is returned.
If the type is the type of a constructed `Mock%601`, constructors are returned according to the generic type argument's constructors. If the type is an interface, the `%23ctor` default constructor is returned. If the type is a class, constructors are returned according to all the public and protected constructors of the underlying type. In this case, the `Object%5b%5d)` constructor that takes a params array is returned for each underlying constructor, with information about the appropriate parameters for each constructor.