public FakeConfigurationManager(IConfigurationFactory configurationFactory, ExpressionCallRule.Factory callRuleFactory, ICallExpressionParser callExpressionParser, IInterceptionAsserter interceptionAsserter) { this.configurationFactory = configurationFactory; this.ruleFactory = callRuleFactory; this.callExpressionParser = callExpressionParser; this.interceptionAsserter = interceptionAsserter; }
internal StartConfiguration(FakeManager manager, ExpressionCallRule.Factory callRuleFactory, IConfigurationFactory configurationFactory, ICallExpressionParser expressionParser, IInterceptionAsserter interceptionAsserter) { this.manager = manager; this.callRuleFactory = callRuleFactory; this.configurationFactory = configurationFactory; this.expressionParser = expressionParser; this.interceptionAsserter = interceptionAsserter; }
private void OnSetup() { this.configurationFactory = A.Fake <IConfigurationFactory>(); this.callExpressionParser = new CallExpressionParser(); this.interceptionAsserter = A.Fake <IInterceptionAsserter>(); this.ruleFactory = x => null; this.configurationManager = this.CreateManager(); }
public StartConfigurationFactory( ExpressionCallRule.Factory expressionCallRuleFactory, IConfigurationFactory configurationFactory, ICallExpressionParser callExpressionParser, IInterceptionAsserter interceptionAsserter) { this.expressionCallRuleFactory = expressionCallRuleFactory; this.configurationFactory = configurationFactory; this.callExpressionParser = callExpressionParser; this.interceptionAsserter = interceptionAsserter; }
public FakeConfigurationManagerTests() { this.configurationFactory = A.Fake <IConfigurationFactory>(); this.callExpressionParser = new CallExpressionParser(); this.interceptionAsserter = A.Fake <IInterceptionAsserter>(); ExpressionCallRule.Factory ruleFactory = A.Dummy <ExpressionCallRule.Factory>(); this.configurationManager = new FakeConfigurationManager( this.configurationFactory, ruleFactory, this.callExpressionParser, this.interceptionAsserter); }
private void OnSetup() { this.configurationFactory = A.Fake <IConfigurationFactory>(); this.callExpressionParser = new CallExpressionParser(); this.interceptionAsserter = A.Fake <IInterceptionAsserter>(); Expression <Action <IFoo> > dummyExpression = x => x.Bar(); var parsedDummyExpression = this.callExpressionParser.Parse(dummyExpression); this.ruleReturnedFromFactory = ServiceLocator.Current.Resolve <ExpressionCallRule.Factory>().Invoke(parsedDummyExpression); this.ruleFactory = x => this.ruleReturnedFromFactory; this.configurationManager = this.CreateManager(); }
protected virtual void OnSetup() { this.fakeObject = A.Fake <FakeManager>(); this.rule = ExpressionHelper.CreateRule <IFoo>(x => x.Bar()); this.ruleFactory = x => { this.argumentToRuleFactory = x; return(this.rule); }; this.configurationFactory = A.Fake <IConfigurationFactory>(); this.expressionParser = A.Fake <ICallExpressionParser>(); this.interceptionAsserter = A.Fake <IInterceptionAsserter>(); }
private void OnSetup() { this.configurationFactory = A.Fake <IConfigurationFactory>(); this.expressionParser = A.Fake <IExpressionParser>(); this.callExpressionParser = new CallExpressionParser(); this.interceptionAsserter = A.Fake <IInterceptionAsserter>(); Expression <Action <IFoo> > dummyExpression = x => x.Bar(); this.ruleReturnedFromFactory = ServiceLocator.Current.Resolve <ExpressionCallRule.Factory>().Invoke(dummyExpression); this.ruleFactory = x => { return(this.ruleReturnedFromFactory); }; this.fakeObjectReturnedFromParser = A.Fake <FakeManager>(o => o.CallsBaseMethods()); A.CallTo(() => this.expressionParser.GetFakeManagerCallIsMadeOn(A <LambdaExpression> ._)).ReturnsLazily(x => this.fakeObjectReturnedFromParser); this.configurationManager = this.CreateManager(); }
private void OnSetUp() { this.configurationFactory = A.Fake<IConfigurationFactory>(); this.expressionParser = A.Fake<IExpressionParser>(); this.callExpressionParser = new CallExpressionParser(); this.interceptionAsserter = A.Fake<IInterceptionAsserter>(); Expression<Action<IFoo>> dummyExpression = x => x.Bar(); this.ruleReturnedFromFactory = ServiceLocator.Current.Resolve<ExpressionCallRule.Factory>().Invoke(dummyExpression); this.ruleFactory = x => { return this.ruleReturnedFromFactory; }; this.fakeObjectReturnedFromParser = new FakeManager(); A.CallTo(() => this.expressionParser.GetFakeManagerCallIsMadeOn(A<LambdaExpression>._)).ReturnsLazily(x => this.fakeObjectReturnedFromParser); this.configurationManager = this.CreateManager(); }
private void OnSetup() { this.configurationFactory = A.Fake<IConfigurationFactory>(); this.callExpressionParser = new CallExpressionParser(); this.interceptionAsserter = A.Fake<IInterceptionAsserter>(); Expression<Action<IFoo>> dummyExpression = x => x.Bar(); var parsedDummyExpression = this.callExpressionParser.Parse(dummyExpression); this.ruleReturnedFromFactory = ServiceLocator.Current.Resolve<ExpressionCallRule.Factory>().Invoke(parsedDummyExpression); this.ruleFactory = x => this.ruleReturnedFromFactory; this.configurationManager = this.CreateManager(); }