AutoMocker.Setup<TService> method (1 of 2)

April 20, 2021 · View on GitHub

Shortcut for mock.Setup(...), creating the mock when necessary.

public ISetup<TService> Setup<TService>(Expression<Action<TService>> setup)
    where TService : class

See Also


AutoMocker.Setup<TService,TReturn> method (2 of 2)

Shortcut for mock.Setup(...), creating the mock when necessary. For specific return types. E.g. primitive, structs that cannot be inferred

public ISetup<TService, TReturn> Setup<TService, TReturn>(Expression<Func<TService, TReturn>> setup)
    where TService : class
parameterdescription
TService
TReturn
setup

See Also