public CommandParameterTests()
 {
     subject = new CommandParameters(Enumerable.Empty<IHaveCommandLineArgs>());
 }
        public void CommandParameters_WhenSpecifyingCommandExtension_ExtensionParameterIsParsed()
        {
            var extension = Substitute.For<IHaveCommandLineArgs>();
            extension.When(e => e.UpdateOptions(Arg.Any<OptionSet>()))
                .Do(c =>
                {
                    var options = c.Arg<OptionSet>();

                    options.Add<string>("newOption=", "description", v => NewOption = v);
                });

            var subject = new CommandParameters(new List<IHaveCommandLineArgs> { extension }, new MockFileSystem()) { Path = ExpectedPath };
            var args = new List<string> { "-newOption=test" };

            subject.Parse(args);

            Assert.Equal("test", NewOption);
        }
 public CommandParameterTests()
 {
     subject = new CommandParameters(Enumerable.Empty<IHaveCommandLineArgs>(), FileSystem) { Path = ExpectedPath };
 }
 public CommandParameterOutputTests()
 {
     subject = new CommandParameters(Enumerable.Empty<IHaveCommandLineArgs>(), new MockFileSystem());
     writer = new StringWriter();
 }
 public CommandParameterTests()
 {
     subject = new CommandParameters();
 }
 public CommandParameterOutputTests()
 {
     subject = new CommandParameters();
     writer = new StringWriter();
 }