public void SetUp()
        {
            var container = new WindsorContainer();

            DependencyResolver.InitializeWith(new WindsorDependencyResolver(container));
            container.AddComponent("transaction.manager", typeof(ITransactionManager), typeof(TestITransactionManager));
            manager   = DependencyResolver.Resolver.GetImplementationOf <ITransactionManager>();
            attribute = new MvcTransactionAttribute();
        }
        public void SetUp()
        {
            var container = new WindsorContainer();

            DependencyResolver.SetResolver(new WindsorDependencyResolver(container));
            container.Register(Component.For <ITransactionManager>().ImplementedBy <TestITransactionManager>().Named("transaction.manager"));
            manager   = DependencyResolver.Current.GetService <ITransactionManager>();
            attribute = new MvcTransactionAttribute();
        }
        public void CanCreateDifferentAttributesWithCorrectParameters()
        {
            var attribute1 = new MvcTransactionAttribute();

            var attribute2 = new MvcTransactionAttribute(TransactionMode.Supported);

            Assert.AreEqual(TransactionMode.Supported, attribute2.TransactionMode);
            var attribute3 = new MvcTransactionAttribute(TransactionMode.RequiresNew, IsolationMode.Chaos);

            Assert.AreEqual(TransactionMode.RequiresNew, attribute3.TransactionMode);
            Assert.AreEqual(IsolationMode.Chaos, attribute3.IsolationMode);
        }