Example #1
0
		public void CanGetEnumValue()
		{
			using (var con = OpenDbConnection())
			{
				con.CreateTable<TypeWithEnum>(true);
				var obj = new TypeWithEnum {Id = 1, EnumValue = SomeEnum.Value1};
				con.Save(obj);
				var target = con.GetById<TypeWithEnum>(obj.Id);
				Assert.AreEqual(obj.Id, target.Id);
				Assert.AreEqual(obj.EnumValue, target.EnumValue);
			}
		}
Example #2
0
 public void CanGetEnumValue()
 {
     using (var con = OpenDbConnection())
     {
         con.CreateTable <TypeWithEnum>(true);
         var obj = new TypeWithEnum {
             Id = 1, EnumValue = SomeEnum.Value1
         };
         con.Save(obj);
         var target = con.GetById <TypeWithEnum>(obj.Id);
         Assert.AreEqual(obj.Id, target.Id);
         Assert.AreEqual(obj.EnumValue, target.EnumValue);
     }
 }