Esempio n. 1
0
        public void should_display_help()
        {
            var plugin = new CommandPlugin();

            var pl = new ParsedLine("!help", "Bob");

            plugin.Evaluate(pl).Should().Contain("the commands I know");

            plugin.Evaluate(pl).Should().Contain("!slap [thing]");

            Debug.Write(plugin.Evaluate(pl));
        }
Esempio n. 2
0
        public void should_hug_with_default()
        {
            var plugin = new CommandPlugin();

            var pl = new ParsedLine("!hug", "Bob");

            plugin.Evaluate(pl).Should().Be("Bob hugs himself");
        }
Esempio n. 3
0
        public void should_hug_with_all_args()
        {
            var plugin = new CommandPlugin();

            var pl = new ParsedLine("!hug Jim and his monkey", "Bob");

            plugin.Evaluate(pl).Should().Be("Bob hugs Jim and his monkey");
        }
Esempio n. 4
0
        public void should_display_directory()
        {
            var plugin = new CommandPlugin();

            var pl = new ParsedLine("!dir", "Bob");

            var result = plugin.Evaluate(pl);

            Debug.WriteLine(result);

            result.Should().Contain("Directory:");
        }
Esempio n. 5
0
        public void scramble()
        {
            var plugin = new CommandPlugin();

            var pl = new ParsedLine("!scramble", "Bob");

            var result = plugin.Evaluate(pl);

            Debug.WriteLine(result);

            result.Should().Contain("B");
            result.Should().Contain("o");
            result.Should().Contain("b");

            result.Trim().Length.Should().Be(3);
        }
Esempio n. 6
0
        public void should_respond_with_slowclap_image_url()
        {
            var plugin = new CommandPlugin();

            var pl = new ParsedLine("!slowclap", "Bob");

            plugin.Evaluate(pl).Should().Be("http://i.imgur.com/r7ZNHvz.gif");
        }
Esempio n. 7
0
        public void weather()
        {
            var plugin = new CommandPlugin();

            var pl = new ParsedLine("!temp", "Bob");

            var result = plugin.Evaluate(pl);

            Debug.WriteLine(result);

            result.Should().Contain("F");
            result.Should().Contain("C)");
        }
Esempio n. 8
0
        public void should_smack_with_default()
        {
            var plugin = new CommandPlugin();

            var pl = new ParsedLine("!smack", "Bob");

            plugin.Evaluate(pl).Should().Be("Bob smacks himself around with a large trout");
        }
Esempio n. 9
0
        public void should_smack_with_all_args()
        {
            var plugin = new CommandPlugin();

            var pl = new ParsedLine("!smack Jim and his monkey", "Bob");

            plugin.Evaluate(pl).Should().Be("Bob smacks Jim and his monkey around with a large trout");
        }
Esempio n. 10
0
        public void should_slap_with_first_arg()
        {
            var plugin = new CommandPlugin();

            var pl = new ParsedLine("!slap Jim", "Bob");

            plugin.Evaluate(pl).Should().Be("Bob slaps Jim");
        }