public static async Task <TResponse> InvokeWithContentAndGetResponseAs <TResponse>(this GitHubMonitorFunction function, SampleCallbackData data) where TResponse : IActionResult { var result = await function.Invoke(req => configureRequest(req, data)); Assert.IsInstanceOfType(result, typeof(TResponse)); return((TResponse)result); }
public static async Task <TResponse> InvokeAndGetResponseAs <TResponse>(this GitHubMonitorFunction function, Action <HttpRequest> configureRequest) where TResponse : IActionResult { var result = await function.Invoke(configureRequest); Assert.IsInstanceOfType(result, typeof(TResponse)); return((TResponse)result); }