Beispiel #1
0
            public async Task Ignores_Mid_Sentence_Mentions(string message)
            {
                // Given
                var fixture = InMemoryBotFixture.Respond("hello", async(ctx) => {
                    await ctx.SendAsync("Shouldn't happen!");
                });

                // When
                var response = await fixture.SendAsync(message);

                // Then
                Assert.Equal(string.Empty, response);
            }
Beispiel #2
0
            public async Task Responds_When_Mentioned(string message)
            {
                // Given
                var fixture = InMemoryBotFixture.Respond("Test", async(ctx) =>
                {
                    await ctx.SendAsync("OK");
                });

                // When
                var response = await fixture.SendAsync(message);

                // Then
                Assert.Equal("OK", response);
            }