Class Mocks
- Namespace
- Moq
- Assembly
- Moq.dll
Allows querying the universe of mocks for those that behave according to the LINQ query specification.
public static class Mocks
- Inheritance
-
Mocks
- Inherited Members
Methods
Of<T>()
Access the universe of mocks of the given type, to retrieve those that behave according to the LINQ query specification.
public static IQueryable<T> Of<T>() where T : class
Returns
- IQueryable<T>
Type Parameters
TThe type of the mocked object to query.
Of<T>(MockBehavior)
Access the universe of mocks of the given type, to retrieve those that behave according to the LINQ query specification.
public static IQueryable<T> Of<T>(MockBehavior behavior) where T : class
Parameters
behaviorMockBehaviorBehavior of the mocks.
Returns
- IQueryable<T>
Type Parameters
TThe type of the mocked object to query.
Of<T>(Expression<Func<T, bool>>)
Access the universe of mocks of the given type, to retrieve those that behave according to the LINQ query specification.
public static IQueryable<T> Of<T>(Expression<Func<T, bool>> specification) where T : class
Parameters
specificationExpression<Func<T, bool>>The predicate with the setup expressions.
Returns
- IQueryable<T>
Type Parameters
TThe type of the mocked object to query.
Of<T>(Expression<Func<T, bool>>, MockBehavior)
Access the universe of mocks of the given type, to retrieve those that behave according to the LINQ query specification.
public static IQueryable<T> Of<T>(Expression<Func<T, bool>> specification, MockBehavior behavior) where T : class
Parameters
specificationExpression<Func<T, bool>>The predicate with the setup expressions.
behaviorMockBehaviorBehavior of the mocks.
Returns
- IQueryable<T>
Type Parameters
TThe type of the mocked object to query.