示例#1
0
        public void InvalidAssemblyLoadTest()
        {
            var manager = new CommandManager();

            manager.AddCommandsFromAssembly(@"Z:\Something that is not exist\myfile.dll");

            var commands = manager.GetCommands();

            Assert.That(commands.Count() == 8);
        }
示例#2
0
        public void AddCommandsFromAssemblyTest()
        {
            var manager      = new CommandManager();
            var assemblyPath = Assembly.GetExecutingAssembly().Location;

            manager.AddCommandsFromAssembly(assemblyPath);

            var commands = manager.GetCommands();

            Assert.That(commands.Count() == 9);
            Assert.That(commands.ToList().Exists(x => x.GetType() == typeof(TestCommand)));
        }