public void CanWriteAndReadUsingBothHeuristicAndExplicitGenericDeclaration()
        {
            var persistentEnumClass = new PersistentEnumClass {
                Id = 1, A = A.Two, B = B.One
            };

            using (ISession s = OpenSession())
            {
                s.Save(persistentEnumClass);
                s.Flush();
            }

            using (ISession s = sessions.OpenSession())
            {
                var saved = s.Get <PersistentEnumClass>(1);
                Assert.That(saved.A, Is.EqualTo(A.Two));
                Assert.That(saved.B, Is.EqualTo(B.One));
                s.Delete(saved);
                s.Flush();
            }
        }
        public async Task CanWriteAndReadUsingBothHeuristicAndExplicitGenericDeclarationAsync()
        {
            var persistentEnumClass = new PersistentEnumClass {
                Id = 1, A = A.Two, B = B.One
            };

            using (ISession s = OpenSession())
            {
                await(s.SaveAsync(persistentEnumClass));
                await(s.FlushAsync());
            }

            using (ISession s = Sfi.OpenSession())
            {
                var saved = await(s.GetAsync <PersistentEnumClass>(1));
                Assert.That(saved.A, Is.EqualTo(A.Two));
                Assert.That(saved.B, Is.EqualTo(B.One));
                await(s.DeleteAsync(saved));
                await(s.FlushAsync());
            }
        }
 protected override void OnSetUp()
 {
     base.OnSetUp();
     p = new PersistentEnumClass(1, A.One, B.Two);
 }
		protected override void OnSetUp()
		{
			base.OnSetUp();
			p = new PersistentEnumClass(1, A.One, B.Two);
		}
		public void CanWriteAndReadUsingBothHeuristicAndExplicitGenericDeclaration()
		{
			var persistentEnumClass = new PersistentEnumClass {Id = 1, A = A.Two, B = B.One};
			using (ISession s = OpenSession())
			{
				s.Save(persistentEnumClass);
				s.Flush();
			}

			using (ISession s = sessions.OpenSession())
			{
				var saved = s.Get<PersistentEnumClass>(1);
				saved.A.Should().Be(A.Two);
				saved.B.Should().Be(B.One);
				s.Delete(saved);
				s.Flush();
			}
		}