Beispiel #1
0
        public void TestWithAliases()
        {
            BotNameRegexComposer composer = new BotNameRegexComposer();
            string actual = composer.ComposeFor("margiebot", "U123456", new string[] { "margie", "snuffleupagus" });

            Assert.AreEqual(@"(<@U123456>|\bmargiebot\b|\bmargie\b|\bsnuffleupagus\b)", actual);
        }
Beispiel #2
0
        public void TestWithoutAliases()
        {
            BotNameRegexComposer composer = new BotNameRegexComposer();
            string actual = composer.ComposeFor("margiebot", "U123456", new string[] { });

            Assert.AreEqual(@"(<@U123456>|\bmargiebot\b)", actual);
        }