Exemple #1
0
        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>);
        }
Exemple #2
0
        public void SetupController <T>() where T : ApiController, new()
        {
            var controller = CreateTestController <T>();

            SetController <T>(controller);
            dependencyMocker = new DependencyMocker(controller);
        }
Exemple #3
0
        // 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>);
        }