提交 f724638c 编写于 作者: D DarkWanderer

Add PostgreSQL test for array

上级 cfce48ee
......@@ -2,6 +2,7 @@
using System.Data;
using System.Data.Common;
using System.Linq;
using Microsoft.VisualBasic;
using Xunit;
namespace Dapper.Tests
......@@ -77,6 +78,17 @@ public void TestPostgresqlChar()
}
}
[FactPostgresql]
public void TestPostgresqlArray()
{
using (var conn = GetOpenNpgsqlConnection())
{
var r = conn.Query<int[]>("select array[1,2,3]").ToList();
Assert.Single(r);
Assert.Equal(new[] { 1, 2, 3 }, r.Single());
}
}
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class FactPostgresqlAttribute : FactAttribute
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册