Deveel.Data.Sql.Statements.PlSqlBlockStringFormatTests.CodeBlock_WithLabel C# (CSharp) Method

CodeBlock_WithLabel() private method

private CodeBlock_WithLabel ( ) : void
return void
        public static void CodeBlock_WithLabel()
        {
            var block = new PlSqlBlockStatement();
            block.Label = "stmt";
            block.Statements.Add(new CallStatement(ObjectName.Parse("proc1"), new[] {
                SqlExpression.Constant(33)
            }));

            var sql = block.ToString();
            var expected = new StringBuilder();
            expected.AppendLine("<<stmt>>");
            expected.AppendLine("BEGIN");
            expected.AppendLine("  CALL proc1(33)");
            expected.Append("END");

            Assert.AreEqual(expected.ToString(), sql);
        }
PlSqlBlockStringFormatTests