internal RuleBuilder(BuildableCallRule ruleBeingBuilt, FakeManager manager, FakeAsserter.Factory asserterFactory) { this.RuleBeingBuilt = ruleBeingBuilt; this.manager = manager; this.asserterFactory = asserterFactory; }
public IAnyCallConfigurationWithReturnTypeSpecified <TMember> CreateConfiguration <TMember>(FakeManager fakeObject, BuildableCallRule callRule) { var parent = this.ruleBuilderFactory.Invoke(callRule, fakeObject); return(new RuleBuilder.ReturnValueConfiguration <TMember>(parent)); }
public IAnyCallConfigurationWithNoReturnTypeSpecified CreateAnyCallConfiguration(FakeManager fakeObject, AnyCallCallRule callRule) { return(new AnyCallConfiguration(fakeObject, callRule, this)); }
public AnyCallConfiguration(FakeManager manager, AnyCallCallRule configuredRule, IConfigurationFactory configurationFactory) { this.manager = manager; this.configuredRule = configuredRule; this.configurationFactory = configurationFactory; }
public IAnyCallConfigurationWithVoidReturnType CreateConfiguration(FakeManager fakeObject, BuildableCallRule callRule) { return(this.ruleBuilderFactory.Invoke(callRule, fakeObject)); }
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)); }
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>())); }
public IVoidArgumentValidationConfiguration CreateConfiguration(FakeManager fakeObject, BuildableCallRule callRule) { return(this.BuilderFactory.Invoke(callRule, fakeObject)); }
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); }