private void InitializeInterceptorBeingBuilt(LambdaExpression expression)
        {
            var callRule = new ExpressionCallRule(expression);

            Fake.AddRule(callRule);
            this.RuleBeingBuilt = callRule;
        }
Ejemplo n.º 2
0
        private void InitializeRuleBeingBuilt(LambdaExpression expression)
        {
            var callRule = this.expressionRuleFactory.Invoke(expression);

            Fake.AddRule(callRule);
            this.RuleBeingBuilt = callRule;
        }
Ejemplo n.º 3
0
        public IVoidConfiguration <TFake> AnyCall()
        {
            this.RuleBeingBuilt = new AnyCallCallRule();
            this.Fake.AddRule(this.RuleBeingBuilt);

            return(this);
        }
Ejemplo n.º 4
0
        internal RuleBuilder(BuildableCallRule ruleBeingBuilt, FakeObject fakeObject, FakeAsserter.Factory asserterFactory)
        {
            Debug.Assert(fakeObject != null);

            this.RuleBeingBuilt  = ruleBeingBuilt;
            this.fakeObject      = fakeObject;
            this.asserterFactory = asserterFactory;
        }
Ejemplo n.º 5
0
            public IAnyCallConfigurationWithReturnTypeSpecified <TMember> CreateConfiguration <TMember>(FakeManager fakeObject, BuildableCallRule callRule)
            {
                var parent        = this.BuilderFactory.Invoke(callRule, fakeObject);
                var configuration = new RuleBuilder.ReturnValueConfiguration <TMember>();

                configuration.ParentConfiguration = parent;
                return(configuration);
            }
Ejemplo n.º 6
0
 public IVoidArgumentValidationConfiguration CreateConfiguration(FakeManager fakeObject, BuildableCallRule callRule)
 {
     return(this.BuilderFactory.Invoke(callRule, fakeObject));
 }
Ejemplo n.º 7
0
 internal RuleBuilder(BuildableCallRule ruleBeingBuilt, FakeManager manager, FakeAsserter.Factory asserterFactory)
 {
     this.RuleBeingBuilt  = ruleBeingBuilt;
     this.manager         = manager;
     this.asserterFactory = asserterFactory;
 }
Ejemplo n.º 8
0
 internal FakeConfiguration(FakeObject fake, BuildableCallRule ruleBeingBuilt)
 {
     this.Fake           = fake;
     this.RuleBeingBuilt = ruleBeingBuilt;
 }
Ejemplo n.º 9
0
 private RuleBuilder CreateBuilder(BuildableCallRule ruleBeingBuilt)
 {
     return new RuleBuilder(ruleBeingBuilt, this.fakeManager, x => this.asserter);
 }
Ejemplo n.º 10
0
            public IReturnValueArgumentValidationConfiguration <TMember> CreateConfiguration <TMember>(FakeObject fakeObject, BuildableCallRule callRule)
            {
                var parent        = this.BuilderFactory.Invoke(callRule, fakeObject);
                var configuration = new RuleBuilder.ReturnValueConfiguration <TMember>();

                configuration.ParentConfiguration = parent;
                return(configuration);
            }
Ejemplo n.º 11
0
 internal RuleBuilder(BuildableCallRule ruleBeingBuilt)
 {
     this.RuleBeingBuilt = ruleBeingBuilt;
 }
 public IAnyCallConfigurationWithVoidReturnType CreateConfiguration(FakeManager fakeObject, BuildableCallRule callRule)
 {
     return(this.BuilderFactory.Invoke(callRule, fakeObject));
 }