Пример #1
0
        public void IsCommandRegistered_Returns_True_When_CommandRegistered()
        {
            var expected = true;
            var c1       = new TestCommand();

            underTest.AddCommand(c1);

            var actual = underTest.IsCommandRegistered(c1);

            Assert.IsTrue(expected == actual);
        }
Пример #2
0
        public void Dispose_RemovesAllCommands_When_Called()
        {
            var c1 = new TestCommand();

            var gc = new GlobalCommand("temp", "help", Access.Administrator);

            gc.AddToConsole();
            gc.AddCommand(c1);

            Assert.IsTrue(gc.IsCommandRegistered(c1));

            gc.Dispose();

            Assert.IsFalse(gc.IsCommandRegistered(c1));
        }