From d03f826dbcb22b2a2a24c43ba98493aceae2fc17 Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Thu, 8 Sep 2016 11:08:12 +0100 Subject: [PATCH] fix broken test to actually include the error! --- Dapper.Tests/Tests.Async.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dapper.Tests/Tests.Async.cs b/Dapper.Tests/Tests.Async.cs index e8a3de6..4b0fd36 100644 --- a/Dapper.Tests/Tests.Async.cs +++ b/Dapper.Tests/Tests.Async.cs @@ -777,12 +777,10 @@ public async Task Issue563_QueryAsyncShouldThrowException() { try { - var data = (await connection.QueryAsync("select 1 union all select 2")).ToList(); + var data = (await connection.QueryAsync("select 1 union all select 2; RAISERROR('after select', 16, 1);")).ToList(); Assert.Fail(); - }catch(SqlException ex) - { - Console.WriteLine(ex.Message); } + catch (SqlException ex) when (ex.Message == "after select") { } } } } -- GitLab