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)); }
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)); }