Npgsql.Tests.CommandBuilderTests.DeriveParametersWithParameterNameFromFunction C# (CSharp) Method

DeriveParametersWithParameterNameFromFunction() private method

private DeriveParametersWithParameterNameFromFunction ( ) : void
return void
        public void DeriveParametersWithParameterNameFromFunction()
        {
            using (var conn = OpenConnection())
            {
                conn.ExecuteNonQuery(@"CREATE OR REPLACE FUNCTION pg_temp.testoutparameter2(x int, y int, out sum int, out product int) as 'select $1 + $2, $1 * $2' language 'sql';");
                var command = new NpgsqlCommand("pg_temp.testoutparameter2", conn) { CommandType = CommandType.StoredProcedure };
                NpgsqlCommandBuilder.DeriveParameters(command);
                Assert.AreEqual(":x", command.Parameters[0].ParameterName);
                Assert.AreEqual(":y", command.Parameters[1].ParameterName);
            }
        }