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) ); }
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) ); }