public void TestThatNHibernateInitializationAwareIsCalled()
        {
            NHInitAwareMock mock = new NHInitAwareMock();

            mock.ConfiguredWasCalled  = 0;
            mock.InitializedWasCalled = 0;

            InitializeNHibernateAndIoC(FrameworkToTest, WindsorFilePath, DatabaseEngine.SQLite, ":memory:",
                                       MappingInfo.From().SetNHInitializationAware(mock));
            Assert.AreEqual(1, mock.BeforeInitializationCalled);
            Assert.AreEqual(1, mock.ConfiguredWasCalled);
            Assert.AreEqual(1, mock.InitializedWasCalled);
        }
        public void TestThatNHInitializeAwareIsCalled()
        {
            var mock = new NHInitAwareMock
            {
                ConfiguredWasCalled  = 0,
                InitializedWasCalled = 0
            };

            InitializeNHibernateAndIoC(ContainerFilePath,
                                       DatabaseEngine.SQLite,
                                       ":memory:",
                                       MappingInfo.From().SetNHInitializationAware(mock),
                                       _ => { });
            Assert.AreEqual(1, mock.BeforeInitializationCalled);
            Assert.AreEqual(1, mock.ConfiguredWasCalled);
            Assert.AreEqual(1, mock.InitializedWasCalled);
        }
        public void TestThatNHibernateInitializationAwareIsCalled()
        {
            NHInitAwareMock mock = new NHInitAwareMock();
            mock.ConfiguredWasCalled = 0;
            mock.InitializedWasCalled = 0;

            IntializeNHibernateAndIoC(FrameworkToTest, WindsorFilePath, DatabaseEngine.SQLite, ":memory:",
                MappingInfo.From().SetNHInitializationAware(mock));
            Assert.AreEqual(1, mock.BeforeInitializationCalled);
            Assert.AreEqual(1, mock.ConfiguredWasCalled);
            Assert.AreEqual(1, mock.InitializedWasCalled);
        }
        public void TestThatNHInitializeAwareIsCalled() {
            var mock = new NHInitAwareMock
                       {
                           ConfiguredWasCalled = 0,
                           InitializedWasCalled = 0
                       };

            InitializeNHibernateAndIoC(ContainerFilePath,
                                       DatabaseEngine.SQLite,
                                       ":memory:",
                                       MappingInfo.From().SetNHInitializationAware(mock),
                                       _ => { });
            Assert.AreEqual(1, mock.BeforeInitializationCalled);
            Assert.AreEqual(1, mock.ConfiguredWasCalled);
            Assert.AreEqual(1, mock.InitializedWasCalled);
        }