Ejemplo n.º 1
0
 public void CustomCommandCollectionCanAddCommand()
 {
     collection.AddCommand("test", "data");
     Assert.That(collection.ContainsCommand("test"), Is.True);
     Assert.That(collection.Commands.ContainsKey("test"));
     Assert.That(collection.Commands["test"].Text, Is.EqualTo("data"));
 }
Ejemplo n.º 2
0
        public async Task CustomChatCommandCanRemoveCommands()
        {
            collection.AddCommand("test", "sub");
            Assert.That(collection.ContainsCommand("test"), Is.True);
            var data = new ChatCommandData("command", new[] { "remove", "test" });
            await command.Process(chat, data);

            Assert.That(collection.ContainsCommand("test"), Is.False);
        }