Re-write your integration test with an Integration test fixture base. In the base class create: a fixture setup that initializes nhibernate and creates a session factory a fixture teardown that closes the session factory a test setup that creates a session and transaction a test teardown that rolls back the transaction and closes the session.
Re-write your integration test with an Integration test fixture base. In the base class create: a fixture setup that initializes nhibernate and creates a session factory a fixture teardown that closes the session factory a test setup that creates a session and transaction a test teardown that rolls back the transaction and closes the session. Like this TestFixture public abstract class TestFixtureBase { protected ISessionFactory SessionFactory { get; private set; } protected ISession Session { get; private set; } protected ITransaction Tx { get; private set; } TestFixtureSetUp public virtual void SetUp() { var nh = new NHInit(); nh.Initialize(); SessionFactory = nh.
SessionFactory; } TestFixtureTearDown public virtual void TearDown() { SessionFactory.Close(); } SetUp public void Test_Set_Up() { Session = SessionFactory.OpenSession(); Tx = Session. BeginTransaction(); } TearDown public void Test_tear_down() { Tx.Rollback(); Tx.Dispose(); Session.Close(); } } then write your test.
Unfortunately I cannot do this because there are multiple transaction inside tested code. Though it is a good idea when testing smaller chunks of functionality. – Jenea Oct 12 at 15:49.
The SaveOrUpdate event listener is called when session. Save or session. Update is called.
When changes are flushed, the FlushEntity event is called for each entity. Implement IFlushEntityEventListener.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.