public void put_a_dependency_into_the_object_def_for_the_inner_behavior() { _wrapper.AddAfter(Wrapper.For <FakeBehavior>()); var def = _wrapper.As <IContainerModel>().ToInstance().As <IConfiguredInstance>(); def.Dependencies.Count().ShouldBe(1); def.FindDependencyDefinitionFor <IActionBehavior>().ReturnedType .ShouldBe(typeof(FakeBehavior)); }
public void put_a_dependency_into_the_object_def_for_the_inner_behavior() { _wrapper.AddAfter(Wrapper.For <FakeBehavior>()); var def = _wrapper.As <IContainerModel>().ToObjectDef(); def.Dependencies.Count().ShouldEqual(1); var dependency = def.Dependencies.First().ShouldBeOfType <ConfiguredDependency>(); dependency.DependencyType.ShouldEqual(typeof(IActionBehavior)); dependency.Definition.Type.ShouldEqual(typeof(FakeBehavior)); }
public void put_a_dependency_into_the_object_def_for_the_inner_behavior() { _wrapper.AddAfter(new ConnegOutputNode(typeof(Output))); ObjectDef def = _wrapper.As <IContainerModel>().ToObjectDef(DiagnosticLevel.None); def.Dependencies.Count().ShouldEqual(1); var dependency = def.Dependencies.First().ShouldBeOfType <ConfiguredDependency>(); dependency.DependencyType.ShouldEqual(typeof(IActionBehavior)); dependency.Definition.Type.ShouldEqual(typeof(ConnegOutputBehavior <Output>)); }
public void put_a_dependency_into_the_object_def_for_the_inner_behavior() { _wrapper.AddAfter(new RenderJsonNode(typeof(Output))); ObjectDef def = _wrapper.ToObjectDef(); def.Dependencies.Count.ShouldEqual(1); var dependency = def.Dependencies.First().ShouldBeOfType <ConfiguredDependency>(); dependency.DependencyType.ShouldEqual(typeof(IActionBehavior)); dependency.Definition.Type.ShouldEqual(typeof(RenderJsonBehavior <Output>)); }
public void SetUp() { WrappedBehaviorWasInvoked = false; NextBehaviorWasInvoked = false; theContainer = new Container(); theContainer.Inject <IDebugReport>(new DebugReport()); theContainer.Inject(MockRepository.GenerateMock <IDebugDetector>()); theRequest = new InMemoryFubuRequest(); theContainer.Inject <IFubuRequest>(theRequest); theService = new Service(); theContainer.Inject(theService); theNode = Wrapper.For <MyBehavior>(); theNode.AddAfter(Wrapper.For <FollowingBehavior>()); }
public void SetUp() { WrappedBehaviorWasInvoked = false; NextBehaviorWasInvoked = false; theContainer = new Container(); theContainer.Inject<IDebugReport>(new DebugReport(null, null)); theContainer.Inject(MockRepository.GenerateMock<IDebugDetector>()); theRequest = new InMemoryFubuRequest(); theContainer.Inject<IFubuRequest>(theRequest); theService = new Service(); theContainer.Inject(theService); theNode = Wrapper.For<MyBehavior>(); theNode.AddAfter(Wrapper.For<FollowingBehavior>()); }
public void SetUp() { WrappedBehaviorWasInvoked = false; NextBehaviorWasInvoked = false; theContainer = new Container(); theRequest = new InMemoryFubuRequest(); theContainer.Inject<IFubuRequest>(theRequest); theService = new Service(); theContainer.Inject(theService); theNode = Wrapper.For<MyBehavior>(); theNode.AddAfter(Wrapper.For<FollowingBehavior>()); }