From c3beb60742d7b44f4fc212b2cbbcdc0c724c80ad Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Fri, 27 May 2016 10:35:28 +0100 Subject: [PATCH] Test for #524 (believed to be a failing test; cannot validate or fix until I get the latest tooling installed) --- Dapper.Tests/Tests.QueryMultiple.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Dapper.Tests/Tests.QueryMultiple.cs b/Dapper.Tests/Tests.QueryMultiple.cs index deef2ed..537c315 100644 --- a/Dapper.Tests/Tests.QueryMultiple.cs +++ b/Dapper.Tests/Tests.QueryMultiple.cs @@ -135,5 +135,21 @@ select @b var retVal = p.Get("RetVal"); retVal.IsEqualTo(3); } + + [Fact] + public void Issue524_QueryMultiple_Cast() + { // aka: Read should work even if the data is a + + // using regular API + connection.Query("select cast(42 as bigint)").IsEqualTo(42); + connection.QuerySingle("select cast(42 as bigint)").IsEqualTo(42); + + // using multi-reader API + using(var reader = connection.QueryMultiple("select cast(42 as bigint); select cast(42 as bigint)")) + { + reader.Read().Single().IsEqualTo(42); + reader.ReadSingle().IsEqualTo(42); + } + } } } -- GitLab