public async Task should_send_typing_indicator() { // given SlackChatHub channel = SlackConnection.ConnectedChannel(Config.Slack.TestChannel); // when await SlackConnection.IndicateTyping(channel); // then }
public async Task should_upload_to_channel_from_file_system() { // given var chatHub = SlackConnection.ConnectedChannel(Config.Slack.TestChannel); // when await SlackConnection.Upload(chatHub, _filePath); // then }
public async Task should_upload_to_channel_from_stream() { // given var chatHub = SlackConnection.ConnectedChannel(Config.Slack.TestChannel); const string fileName = "slackconnector-test-stream-upload.txt"; // when using (var fileStream = EmbeddedResourceFileReader.ReadEmbeddedFile("UploadTest.txt")) { await SlackConnection.Upload(chatHub, fileStream, fileName); } // then }
public async Task should_say_something_on_channel() { // given var message = new BotMessage { Text = "Test text for INT test", ChatHub = SlackConnection.ConnectedChannel(Config.Slack.TestChannel) }; // when await SlackConnection.Say(message); // then }
public async Task should_say_something_on_channel() { // given var message = new BotMessage { Text = "Test text for INT test", ChatHub = SlackConnection.ConnectedChannel(Config.Slack.TestChannel) }; // when await SlackConnection.Say(message); SlackConnection.OnMessageReceived += slackMessage => { _output.WriteLine(slackMessage.Text); return(Task.CompletedTask); }; // then //await Task.Delay(TimeSpan.FromMinutes(2)); }