Ejemplo n.º 1
0
        public CommandLineParserTests()
        {
            _commandRepository = Substitute.For <ICommandRepository>();
            _commandRepository.GetCommandType("dosomething").Returns(typeof(DoSomethingCommand));
            _commandRepository.GetCommandType("dosomething-ntimes").Returns(typeof(DoSomethingNTimesCommand));
            _commandRepository.GetCommandType("DoSomethingWithDates").Returns(typeof(DoSomethingWithDatesCommand));
            _commandRepository.GetCommandType("DoSomethingWithGuids").Returns(typeof(DoSomethingWithGuidsCommand));
            _commandRepository.GetCommandType("ex").Returns(typeof(ThrowExceptionCommand));
            _commandRepository.GetCommandType("asynccommand").Returns(typeof(AsyncCommand));

            _commandLineParser = new CommandLineParser(_commandRepository);
        }