コード例 #1
0
        public void should_respond_to_partial_trigger()
        {
            var plugin = new CannedResponsePlugin();

            var pl = new ParsedLine("This line contains the partial trigger fnord, which should be enough", "bob");

            plugin.Evaluate(pl).Should().Be("You said fnord!");
        }
コード例 #2
0
        public void should_not_respond_to_partial_trigger()
        {
            var plugin = new CannedResponsePlugin();

            var pl = new ParsedLine("This is the exact trigger purple monkey dishwahser", "bob");

            plugin.Evaluate(pl).Should().BeNull("This wasn't the exact trigger");
        }
コード例 #3
0
        public void a_trap()
        {
            var plugin = new CannedResponsePlugin();

            var pl = new ParsedLine("I think it's a tRap", "bob");

            plugin.Evaluate(pl).Should().Be("https://skydrive.live.com/redir?resid=3F2CFE9060480107%21285");
        }
コード例 #4
0
        public void should_respond_to_exact_trigger()
        {
            // Default app.config; one response in file, 100% response chance
            var plugin = new CannedResponsePlugin();

            var pl = new ParsedLine("This is the exact trigger", "bob");

            plugin.Evaluate(pl)
                  .Should()
                  .Be("This is the exact response");
        }