public void GetPossibleMethods_ReturnsCorrectAmountOfMethods() { var fastMethodInvoker = new FastMethodInvoker(); var logger = new ConsoleLogger(); var config = new CommandsConfiguration(); var argumentsConverter = new ArgumentsConverter(config); ICommandsLoader commandsLoader = new CommandsLoader(fastMethodInvoker, logger, argumentsConverter); var methodsParser = new MethodsParser(); var args = new string[] { "1", "2" }; commandsLoader.LoadCommands(Assembly.GetExecutingAssembly()); var possibleMethods = methodsParser.GetPossibleMethods("TeSt4", args, commandsLoader.GetCommandData("TeSt4") !).ToList(); Assert.AreEqual(4, possibleMethods.Count); }
static int Main(string[] args) { Environment.CurrentDirectory = GetCurrentDirectory(); var container = AutofacConfig.ConfigureContainer(); var commands = CommandsConfiguration.GetCommandsFromConfig(container); commands.Add(container.Resolve <StartCommand>()); commands.Add(container.Resolve <StopCommand>()); commands.Add(container.Resolve <ArchiveCommand>()); commands.Add(container.Resolve <CurrentCommand>()); commands.Add(container.Resolve <ClearCommand>()); commands.Add(container.Resolve <RenameCommand>()); return(ConsoleCommandDispatcher.DispatchCommand(commands, args, Console.Out)); }