public static MockMoq <T> CreateMockedDepProp <T>(string dependencyName, string methodName, object value = null) where T : class { var mocker = new DependencyMocker(); mocker.MockDependencyMethodCall <T>(dependencyName, methodName, value); return(mocker.mockTarget as MockMoq <T>); }
public void SetupController <T>() where T : ApiController, new() { var controller = CreateTestController <T>(); SetController <T>(controller); dependencyMocker = new DependencyMocker(controller); }
// TODO: Use dependencyMocker to mock nested object public static MockMoq <T> CreateMockedProp <T>(string name, object value = null) where T : class { var mocker = new DependencyMocker(); mocker.SetPropPath(name, value); return(mocker.mockTarget as MockMoq <T>); }