Inheritance: IUnitOfWork
Exemplo n.º 1
0
        protected override void SharedContext()
        {
            mockUoW = new MockUnitOfWork();
            mockUoWFactory = new MockUoWFactory(mockUoW);
            IRepositoryFactory repositoryFactory = new StructureMapRepositoryFactory();
            uowStorage = new ThreadStaticUnitOfWorkStorage();

            UnitOfWork.Configure(new UnitOfWorkConfigurationBase(mockUoWFactory, repositoryFactory, uowStorage));
        }
Exemplo n.º 2
0
 public MockUoWFactory(MockUnitOfWork uow)
 {
     GeneratedTransactionManagers = new List<MockTransactionManager>();
     _uow = uow;
 }
Exemplo n.º 3
0
 public MockUoWFactory(MockUnitOfWork uow)
 {
     GeneratedTransactionManagers = new List <MockTransactionManager>();
     _uow = uow;
 }
Exemplo n.º 4
0
        protected override void Context()
        {
            base.Context();

            try
            {
                mockUoW = new MockUnitOfWork();
                mockUoWFactory = new MockUoWFactory(mockUoW);
                IRepositoryFactory repositoryFactory = new StructureMapRepositoryFactory();
                IUnitOfWorkStorage uowStorage = new ThreadStaticUnitOfWorkStorage();
                UnitOfWork.Configure(new UnitOfWorkConfigurationBase(mockUoWFactory, repositoryFactory, uowStorage));

                UnitOfWork.Start(() =>
                {
                    Transaction.Begin();
                    Transaction.Commit();
                });
            }
            catch (Exception ex)
            {
                caughtException = ex;
            }
        }