Esempio n. 1
0
        public void BelongingCommandsFound()
        {
            IServiceProvider provider = GetServiceProvider();
            ICommandFinder   finder   = GetCommandFinder(provider);

            IEnumerable <CommandDescriptor> commands = finder.GetCommands(typeof(SpecificCommandSet)).OrderBy(c => c.Name);

            Assert.Collection(
                commands,
                descriptor => Assert.IsType <ExitCommand>(descriptor.Command),
                descriptor => Assert.IsType <ListCommand>(descriptor.Command)
                );
        }
Esempio n. 2
0
        public void DefaultCommandsFound()
        {
            IServiceProvider provider = GetServiceProvider();
            ICommandFinder   finder   = GetCommandFinder(provider);

            IEnumerable <CommandDescriptor> commands = finder.GetCommands().OrderBy(c => c.Name);

            Assert.Collection(
                commands,
                descriptor => Assert.IsType <ByeCommand>(descriptor.Command),
                descriptor => Assert.IsType <SayCommand>(descriptor.Command)
                );
        }