public async void ProcessAsyncShouldFailWithNullBot()
        {
            // Arrange
            var mockBotAdapter = new Mock <IBotFrameworkHttpAdapter>().Object;
            var mockOptions    = new RingCentralOptions()
            {
                RingCentralEngageApiAccessToken = "1111",
                RingCentralEngageApiUrl         = "http://someurl.com",
                BotId = "testbot"
            };
            var rcw          = new RingCentralClientWrapper(OptionsHelper.GetOptionsMonitor(mockOptions), new StaticHandoffRequestRecognizer());
            var adapter      = new RingCentralAdapter(rcw, mockBotAdapter, new StaticHandoffRequestRecognizer());
            var httpRequest  = new Mock <HttpRequest>();
            var httpResponse = new Mock <HttpResponse>();

            // Act & Assert
            await Assert.ThrowsAsync <ArgumentNullException>(async() =>
            {
                await adapter.ProcessAsync(httpRequest.Object, httpResponse.Object, null, default);
            });
        }
コード例 #2
0
 public async Task Actions()
 {
     await _adapter.ProcessAsync(Request, Response, _bot, default(CancellationToken));
 }