提交 d03f826d 编写于 作者: M Marc Gravell

fix broken test to actually include the error!

上级 d506c176
...@@ -777,12 +777,10 @@ public async Task Issue563_QueryAsyncShouldThrowException() ...@@ -777,12 +777,10 @@ public async Task Issue563_QueryAsyncShouldThrowException()
{ {
try try
{ {
var data = (await connection.QueryAsync<int>("select 1 union all select 2")).ToList(); var data = (await connection.QueryAsync<int>("select 1 union all select 2; RAISERROR('after select', 16, 1);")).ToList();
Assert.Fail(); Assert.Fail();
}catch(SqlException ex)
{
Console.WriteLine(ex.Message);
} }
catch (SqlException ex) when (ex.Message == "after select") { }
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册