Exemplo n.º 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;
            }
        }
Exemplo n.º 2
0
 private void Cleanup()
 {
     Sfi?.Close();
     _sessionFactory = null;
     cfg             = null;
     _schemaExport   = null;
 }
Exemplo n.º 3
0
 protected void RebuildSessionFactory()
 {
     _sessionFactory = BuildSessionFactory();
 }
Exemplo n.º 4
0
 public StatelessSessionBuilder(IStatelessSessionBuilder actualBuilder, DebugSessionFactory debugFactory)
 {
     _actualBuilder = actualBuilder;
     _debugFactory  = debugFactory;
 }
Exemplo n.º 5
0
 protected void RebuildSessionFactory()
 {
     Sfi?.Close();
     _sessionFactory = BuildSessionFactory();
 }