public void CanInsertAndSelectByteArray()
        {
            var orig = new TypeWithByteArrayField { Id = 1, Content = new byte[] { 0, 17, 0, 17, 0, 7 } };

            using (var db = OpenDbConnection())
            {
                db.CreateTable<TypeWithByteArrayField>(true);

                db.Save(orig);

                var target = db.SingleById<TypeWithByteArrayField>(orig.Id);

                Assert.AreEqual(orig.Id, target.Id);
                Assert.AreEqual(orig.Content, target.Content);
            }
        }
Esempio n. 2
0
        public void CanInsertAndSelectByteArray()
        {
            var orig = new TypeWithByteArrayField {
                Id = 1, Content = new byte[] { 0, 17, 0, 17, 0, 7 }
            };

            using (var db = OpenDbConnection())
            {
                db.CreateTable <TypeWithByteArrayField>(true);

                db.Save(orig);

                var target = db.GetById <TypeWithByteArrayField>(orig.Id);

                Assert.AreEqual(orig.Id, target.Id);
                Assert.AreEqual(orig.Content, target.Content);
            }
        }