Ejemplo n.º 1
0
        public async void NamedPipeServer_SendAsync_With_No_Message()
        {
            var pipeName       = Guid.NewGuid().ToString().Substring(0, 18);
            var requestHandler = new StreamingRequestHandler(new MockBot(), new BotFrameworkHttpAdapter(), pipeName);
            var pipe           = new NamedPipeServer(pipeName, requestHandler);

            await Assert.ThrowsAsync <ArgumentNullException>(() => pipe.SendAsync(null));
        }
Ejemplo n.º 2
0
        public async void NamedPipeServer_SendAsync_With_No_Connected_Client()
        {
            var pipeName       = Guid.NewGuid().ToString().Substring(0, 18);
            var requestHandler = new StreamingRequestHandler(new MockBot(), new BotFrameworkHttpAdapter(), pipeName);
            var pipe           = new NamedPipeServer(pipeName, requestHandler);
            var message        = new StreamingRequest();

            await Assert.ThrowsAsync <InvalidOperationException>(() => pipe.SendAsync(message));
        }