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);
        }
 public int LoadMapper()
 {
     return(_fsm.Initialize(NHibernateHelper.OpenSession()));
 }
示例#4
0
 public int LoadMapper()
 {
     _log.Info("Connecting to database using: " + DatabaseConnectionString);
     return(_fsm.Initialize(DatabaseConnectionString));
 }