예제 #1
0
        public void TestFixtureSetUp()
        {
            try
            {
                Configure();
                if (!AppliesTo(Dialect))
                {
                    Assert.Ignore(GetType() + " does not apply to " + Dialect);
                }

                CreateSchema();
                try
                {
                    _sessionFactory = BuildSessionFactory();
                    if (!AppliesTo(_sessionFactory))
                    {
                        Assert.Ignore(GetType() + " does not apply with the current session-factory configuration");
                    }
                }
                catch
                {
                    DropSchema();
                    throw;
                }
            }
            catch (Exception e)
            {
                Cleanup();
                log.Error("Error while setting up the test fixture", e);
                throw;
            }
        }
예제 #2
0
 private void Cleanup()
 {
     Sfi?.Close();
     _sessionFactory = null;
     cfg             = null;
     _schemaExport   = null;
 }
예제 #3
0
 protected void RebuildSessionFactory()
 {
     _sessionFactory = BuildSessionFactory();
 }
예제 #4
0
 public StatelessSessionBuilder(IStatelessSessionBuilder actualBuilder, DebugSessionFactory debugFactory)
 {
     _actualBuilder = actualBuilder;
     _debugFactory  = debugFactory;
 }
예제 #5
0
 protected void RebuildSessionFactory()
 {
     Sfi?.Close();
     _sessionFactory = BuildSessionFactory();
 }