Пример #1
0
        public void Params_ShouldBe_Empty()
        {
            var args   = new[] { "one", "-two", "--zero" };
            var option = new CommandLineOption("zero", args);

            var result = option.Params();

            result.Should().BeEmpty();
        }
Пример #2
0
        public void Params_ShouldBe_ArgsAfterOption_TillEnd()
        {
            var args     = new[] { "--zero", "three", "\"http://daily.com\"" };
            var expected = new[] { "three", "\"http://daily.com\"" };
            var option   = new CommandLineOption("zero", args);

            var result = option.Params();

            result.Should().ContainInOrder(expected);
        }
Пример #3
0
        private string GetCommandLineLanguage(string[] args)
        {
            var option = new CommandLineOption("lang", args);

            return(option.Params().FirstOrDefault());
        }