include additional data for error object (#1539)

* include additional data for error

* fix tests
This commit is contained in:
Alan Ren
2022-06-10 20:40:22 -07:00
committed by GitHub
parent 5e3d24bbfa
commit 17b6073c87
14 changed files with 64 additions and 54 deletions

View File

@@ -48,14 +48,14 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common.RequestContextMocking
public static Mock<RequestContext<TResponse>> AddErrorHandling<TResponse>(
this Mock<RequestContext<TResponse>> mock,
Action<string, int> errorCallback)
Action<string, int, string> errorCallback)
{
// Setup the mock for SendError
var sendErrorFlow = mock.Setup(rc => rc.SendError(It.IsAny<string>(), It.IsAny<int>()))
var sendErrorFlow = mock.Setup(rc => rc.SendError(It.IsAny<string>(), It.IsAny<int>(), It.IsAny<string>()))
.Returns(Task.FromResult(0));
if (errorCallback != null)
{
sendErrorFlow.Callback<string, int>(errorCallback);
sendErrorFlow.Callback<string, int, string>(errorCallback);
}
return mock;