Esempio n. 1
0
 internal RuleBuilder(BuildableCallRule ruleBeingBuilt, FakeManager manager, FakeAsserter.Factory asserterFactory)
 {
     this.RuleBeingBuilt  = ruleBeingBuilt;
     this.manager         = manager;
     this.asserterFactory = asserterFactory;
 }
Esempio n. 2
0
            public IAnyCallConfigurationWithReturnTypeSpecified <TMember> CreateConfiguration <TMember>(FakeManager fakeObject, BuildableCallRule callRule)
            {
                var parent = this.ruleBuilderFactory.Invoke(callRule, fakeObject);

                return(new RuleBuilder.ReturnValueConfiguration <TMember>(parent));
            }
Esempio n. 3
0
 public IAnyCallConfigurationWithNoReturnTypeSpecified CreateAnyCallConfiguration(FakeManager fakeObject, AnyCallCallRule callRule)
 {
     return(new AnyCallConfiguration(fakeObject, callRule, this));
 }
Esempio n. 4
0
 public AnyCallConfiguration(FakeManager manager, AnyCallCallRule configuredRule, IConfigurationFactory configurationFactory)
 {
     this.manager              = manager;
     this.configuredRule       = configuredRule;
     this.configurationFactory = configurationFactory;
 }
Esempio n. 5
0
 public IAnyCallConfigurationWithVoidReturnType CreateConfiguration(FakeManager fakeObject, BuildableCallRule callRule)
 {
     return(this.ruleBuilderFactory.Invoke(callRule, fakeObject));
 }
Esempio n. 6
0
        private static RecordingCallRule <TFake> CreateRecordingRule <TFake>(RecordedCallRule recordedRule, FakeManager fakeObject)
        {
            var factory = ServiceLocator.Current.Resolve <IRecordingCallRuleFactory>();

            return(factory.Create <TFake>(fakeObject, recordedRule));
        }
        private IVoidArgumentValidationConfiguration CreateVoidArgumentValidationConfiguration(FakeManager fake, ParsedCallExpression parsedCallExpression)
        {
            var rule = this.ruleFactory.Invoke(parsedCallExpression);

            return(this.configurationFactory.CreateConfiguration(fake, rule));
        }
Esempio n. 8
0
        private static RecordingRuleBuilder CreateBuilder(RecordedCallRule rule, FakeManager fakeObject)
        {
            var factory = ServiceLocator.Current.Resolve <RecordingRuleBuilder.Factory>();

            return(factory.Invoke(rule, fakeObject));
        }
 public IAnyCallConfigurationWithNoReturnTypeSpecified CreateAnyCallConfiguration(FakeManager fakeObject, AnyCallCallRule callRule)
 {
     return(new AnyCallConfiguration(fakeObject, callRule, this.Container.Resolve <IConfigurationFactory>()));
 }
Esempio n. 10
0
 public IVoidArgumentValidationConfiguration CreateConfiguration(FakeManager fakeObject, BuildableCallRule callRule)
 {
     return(this.BuilderFactory.Invoke(callRule, fakeObject));
 }
Esempio n. 11
0
 public RecordingCallRule <TFake> Create <TFake>(FakeManager fakeObject, RecordedCallRule recordedRule)
 {
     return(new RecordingCallRule <TFake>(fakeObject, recordedRule, this.Container.Resolve <FakeAsserter.Factory>(), this.Container.Resolve <IFakeObjectCallFormatter>()));
 }
 private void SetManager(object fake, FakeManager manager)
 {
     A.CallTo(() => this.fakeManagerAccessor.GetFakeManager(fake)).Returns(manager);
     A.CallTo(() => this.fakeManagerAccessor.TryGetFakeManager(fake)).Returns(manager);
 }