public void TestLoadFuturesMapping()
        {
            var sessionFactory = BuildSessionFactory();
            var fsm            = new FuturesSymbolMapper();
            var recordsLoaded  = fsm.Initialize(sessionFactory.OpenSession());

            Assert.IsTrue(recordsLoaded > 0);

            var fsmC           = new FuturesSymbolMapper();
            var recordsLoadedC = fsmC.Initialize(sessionFactory.OpenSession());

            Assert.IsTrue(recordsLoaded > 0);
            Assert.AreEqual(recordsLoaded, recordsLoadedC);

            var reloadCount = fsm.Reload(sessionFactory.OpenSession());

            Assert.AreEqual(reloadCount, recordsLoaded);
        }
示例#2
0
        public void TestLoadFuturesMapping()
        {
            var connectionString = BuildConnectionString();
            var fsm           = new FuturesSymbolMapper();
            var recordsLoaded = fsm.Initialize(connectionString);

            Assert.IsTrue(recordsLoaded > 0);

            var badbContext    = new BADBEntities(connectionString);
            var fsmC           = new FuturesSymbolMapper();
            var recordsLoadedC = fsmC.Initialize(badbContext);

            Assert.IsTrue(recordsLoaded > 0);
            Assert.AreEqual(recordsLoaded, recordsLoadedC);

            var reloadCount = fsm.Reload(badbContext);

            Assert.AreEqual(reloadCount, recordsLoaded);
        }
 void ReloadMapper(object state)
 {
     _log.Info("Mapper load started");
     _fsm.Reload(NHibernateHelper.OpenSession());
     _log.Info("Mapper load completed");
 }
示例#4
0
 void ReloadMapper(object state)
 {
     _log.Info("Mapper load started");
     _fsm.Reload(DatabaseConnectionString);
     _log.Info("Mapper load completed");
 }