private void InternalComplete()
            {
                if (string.IsNullOrEmpty(databaseName))
                {
                    databaseName = DeriveDatabaseNameFrom(databaseEngine, mappingInfo.MappingAssemblies[0]);
                }
                UnitOfWorkTestContext context = ioc.GetUnitOfWorkTestContext();

                IsRunningInTestMode = true;

                if (!Equals(context, CurrentContext) || IsInversionOfControlContainerOutOfSynchWith(context))
                {
                    context.InitializeContainerAndUowFactory();
                }
                CurrentContext = context;
                Debug.Print(string.Format("CurrentContext is: {0}", CurrentContext));
            }
Esempio n. 2
0
            private void InternalComplete()
            {
                if (_databaseName.IsWhiteSpace())
                {
                    _databaseName = DeriveDatabaseNameFrom(_databaseEngine, _mappingInfo.MappingAssemblies[0]);
                }

                var context = _ioc.GetUnitOfWorkTestContext();

                IsRunningInTestMode = true;

                if (Equals(context, CurrentContext) == false && IsInversionOfControlContainerOutOfSyncWith(context))
                {
                    context.InitializeContainerAndUnitOfWorkFactory();
                }

                CurrentContext = context;
                Debug.Print("CurrentContext is: " + CurrentContext);
            }