Exemple #1
0
        public override void SetUp()
        {
            base.SetUp();

            var clientTransaction = ClientTransaction.CreateRootTransaction();
            var sampleObject      = LifetimeService.NewObject(clientTransaction, typeof(SampleObject), ParamList.Empty);

            _objectID = sampleObject.ID;
            clientTransaction.Commit();

            var locator = DefaultServiceLocator.Create();
            var factory = new LinqToSqlExtensionFactory();

            locator.RegisterSingle <IClientTransactionExtensionFactory> (() => factory);
            locator.RegisterSingle <IPersistenceExtensionFactory> (() => factory);
            _serviceLocatorScope = new ServiceLocatorScope(locator);

            _tracingLinqToSqlAppender = new TracingLinqToSqlAppender();
            SetAppender(_tracingLinqToSqlAppender);
        }
        public override void SetUp()
        {
            base.SetUp();

            _factory = new LinqToSqlExtensionFactory();
        }