예제 #1
0
        public void Can_store_and_retrieve_string_with_8000_characters_from_text_field()
        {
            using var db = OpenDbConnection();
            db.CreateTable <TypeWithTextField>(true);

            var obj = new TypeWithTextField()
            {
                Value = CreateString(8000)
            };

            Assert.AreEqual(8000, obj.Value.Length);

            db.Save(obj);
            obj.Id = (int)db.LastInsertId();

            var target = db.SingleById <TypeWithTextField>(obj.Id);

            Assert.AreEqual(obj.Value, target.Value);
            Assert.AreEqual(8000, obj.Value.Length);
        }
        public void Can_store_and_retrieve_string_with_8000_characters_from_text_field()
        {
            using (var db = OpenDbConnection())
            {
                db.CreateTable<TypeWithTextField>(true);

                var obj = new TypeWithTextField() {
                    Value = CreateString(8000)
                };

                Assert.AreEqual(8000, obj.Value.Length);

                db.Save(obj);
                obj.Id = (int)db.LastInsertId();

                var target = db.SingleById<TypeWithTextField>(obj.Id);

                Assert.AreEqual(obj.Value, target.Value);
                Assert.AreEqual(8000, obj.Value.Length);
            }
        }