public static UnitOfWorkTestContext For(PersistenceFramework framwork,
                                                IWindsorContainer container,
                                                UnitOfWorkTestContextDbStrategy dbStrategy,
                                                MappingInfo mappingInfo)
		{
			UnitOfWorkTestContext context = For(framwork, string.Empty, dbStrategy, mappingInfo);
			context.rhinoContainer = container;
			return context;
		}
 public static UnitOfWorkTestContext For(PersistenceFramework framwork,
                                         string rhinoContainerConfig,
                                         UnitOfWorkTestContextDbStrategy dbStrategy,
                                         MappingInfo mappingInfo)
 {
     switch (framwork)
     {
         case PersistenceFramework.ActiveRecord:
             return CreateActiveRecordImplementation(dbStrategy, mappingInfo, rhinoContainerConfig);
         case PersistenceFramework.NHibernate:
             return new NHibernateUnitOfWorkTestContext(dbStrategy, rhinoContainerConfig, mappingInfo);
         default:
             throw new ArgumentOutOfRangeException();
     }
 }
        private static UnitOfWorkTestContext CreateActiveRecordImplementation(UnitOfWorkTestContextDbStrategy dbStrategy,
                                                                                MappingInfo mappingInfo,
                                                                                string rhinoContainerConfig)
        {
            if (activeRecordType == null)
                activeRecordType = Type.GetType(activeRecordTestContextType);
			if (activeRecordType == null)
			{
				throw new InvalidOperationException("Could not find Active Record context type. Did you forget to reference 'Rhino.Commons.ActiveRecord'?");
			}
            return
                (UnitOfWorkTestContext)
                Activator.CreateInstance(activeRecordType,
                                         new object[] {dbStrategy, rhinoContainerConfig, mappingInfo});
        }
 public NHibernateUnitOfWorkTestContext(UnitOfWorkTestContextDbStrategy dbStrategy,
                                        string rhinoContainerConfigPath,
                                        MappingInfo assemblies)
     : base(dbStrategy, rhinoContainerConfigPath, assemblies) {}
 public UnitOfWorkTestContext(UnitOfWorkTestContextDbStrategy dbStrategy,
                              string rhinoContainerConfigPath,
                              MappingInfo assemblies)
 {
     this.rhinoContainerConfigPath = rhinoContainerConfigPath ?? string.Empty;
     this.dbStrategy = dbStrategy;
     mappingInfo = assemblies;
     this.dbStrategy.TestContext = this;
 }