public void SetUp() { _handler = MockRepository.GenerateStub<ICommandExecutor<FakeCommand>>(); _container = new WindsorContainer(); _interceptor = new FakeInterceptor(); _interceptor2 = new FakeInterceptor2(); _container.Register( Component.For<IWindsorContainer>().Instance(_container), Component.For<ICommandExecutor<FakeCommand>>().Instance(_handler), Component.For<ICommandServiceInterceptor>().Instance(_interceptor), Component.For<ICommandServiceInterceptor>().Instance(_interceptor2), Component.For<ICommandService>().ImplementedBy<WindsorCommandService>()); var svc = _container.Resolve<ICommandService>(); _testCommand = new FakeCommand(); svc.Execute(_testCommand); }
public void SetUp() { _handler = MockRepository.GenerateStub <ICommandExecutor <FakeCommand> >(); _container = new WindsorContainer(); _interceptor = new FakeInterceptor(); _interceptor2 = new FakeInterceptor2(); _container.Register( Component.For <IWindsorContainer>().Instance(_container), Component.For <ICommandExecutor <FakeCommand> >().Instance(_handler), Component.For <ICommandServiceInterceptor>().Instance(_interceptor), Component.For <ICommandServiceInterceptor>().Instance(_interceptor2), Component.For <ICommandService>().ImplementedBy <WindsorCommandService>()); var svc = _container.Resolve <ICommandService>(); _testCommand = new FakeCommand(); svc.Execute(_testCommand); }
public void SetUp() { _handler = new Mock <ICommandExecutor <FakeCommand> >(); _handler.SetupAllProperties(); _container = new WindsorContainer(); _interceptor = new FakeInterceptor(); _interceptor2 = new FakeInterceptor2(); _container.Register( Component.For <IWindsorContainer>().Instance(_container), Component.For <ICommandExecutor <FakeCommand> >().Instance(_handler.Object), Component.For <ICommandServiceInterceptor>().Instance(_interceptor), Component.For <ICommandServiceInterceptor>().Instance(_interceptor2), Component.For <ICommandService>().ImplementedBy <WindsorCommandService>()); var svc = _container.Resolve <ICommandService>(); _testCommand = new FakeCommand(); svc.Execute(_testCommand); }
public void SetUp() { _handler = new Mock<ICommandExecutor<FakeCommand>>(); _handler.SetupAllProperties(); _container = new WindsorContainer(); _interceptor = new FakeInterceptor(); _interceptor2 = new FakeInterceptor2(); _container.Register( Component.For<IWindsorContainer>().Instance(_container), Component.For<ICommandExecutor<FakeCommand>>().Instance(_handler.Object), Component.For<ICommandServiceInterceptor>().Instance(_interceptor), Component.For<ICommandServiceInterceptor>().Instance(_interceptor2), Component.For<ICommandService>().ImplementedBy<WindsorCommandService>()); var svc = _container.Resolve<ICommandService>(); _testCommand = new FakeCommand(); svc.Execute(_testCommand); }