Skip to content

IItemContext<TFixtureItem,TPathProvider>.GetAsMoq<TReturnType> method

Gets a configured member or dependencies of the fixture item as an Mock.

csharp
public Mock<TReturnType> GetAsMoq<TReturnType>(
    Func<TPathProvider, MemberPath<TFixtureItem, TReturnType>> selector)
    where TReturnType : class
public Mock<TReturnType> GetAsMoq<TReturnType>(
    Func<TPathProvider, MemberPath<TFixtureItem, TReturnType>> selector)
    where TReturnType : class
parameterdescription
TReturnTypeThe return type.
selectorFunction for selecting a member.

Return Value

A mock of the instance of the requested member or dependencies.

See Also