public void long_text_is_persisted()
        {
            var longText = new string(Enumerable.Repeat('X', 20000).ToArray());
            var entity   = new EntityWithText(longText);

            Save(entity);
            Clear();

            entity = Get <EntityWithText>(entity.Id);

            entity.Text.ShouldBe(longText);
        }
        public void entity_is_loaded_from_database()
        {
            var entityRepository = new NhibernateRepository<EntityWithText>(UnitOfWork);
            var entity = new EntityWithText("hello");
            entityRepository.Save(entity);
            UnitOfWork.Flush();
            UnitOfWork.Clear();


            entity = entityRepository.Load(entity.Id, LockMode.Upgrade);


            entity.ShouldNotBeNull();            
            entity.Text.ShouldBe("hello");            
        }
        public async Task entity_is_loaded_from_database()
        {
            var entityRepository = new NhibernateRepository <EntityWithText>(UnitOfWork);
            var entity           = new EntityWithText("hello");
            await entityRepository.SaveAsync(entity);

            UnitOfWork.Flush();
            UnitOfWork.Clear();


            entity = await entityRepository.LoadAsync(entity.Id);


            entity.ShouldNotBeNull();
            entity.Text.ShouldBe("hello");
        }