Deveel.Data.InsertTests.OneValueWithLob C# (CSharp) Method

OneValueWithLob() private method

private OneValueWithLob ( ) : void
return void
        public void OneValueWithLob()
        {
            const string testBio = "A simple test string that can span several characters, " +
                                   "that is trying to be the longest possible, just to prove" +
                                   "the capacity of a LONG VARCHAR to handle very long strings. " +
                                   "Anyway it is virtually impossible to reach the maximum size " +
                                   "of a long object, that is organized in 64k byte pages and " +
                                   "spans within the local system without any constraint of size. " +
                                   "For sake of memory anyway, the maximum size of the test object " +
                                   "is set to just 2048 bytes.";

            var tableName = ObjectName.Parse("APP.test_table");
            var columns = new[] { "first_name", "last_name", "active", "bio" };
            var bio = CreateBio(testBio);

            var values = new List<SqlExpression[]> {
                new[] {
                    SqlExpression.Constant("Antonello"),
                    SqlExpression.Constant("Provenzano"),
                    SqlExpression.Constant(true),
                    SqlExpression.Constant(bio)
                },
            };

            var count = AdminQuery.Insert(tableName, columns, values.ToArray());

            Assert.AreEqual(1, count);

            var table = AdminQuery.Access().GetTable(tableName);

            Assert.IsNotNull(table);
            Assert.AreEqual(1, table.RowCount);
        }