Пример #1
0
        public void Bug_IfBilgePassed_NullRefException()
        {
            b.Info.Flow();
            var clas = new CommandArgumentSupport(b);

            clas.ArgumentPostfix = ":";
            string[] args = new string[] {
                "firstonethenanother:gloop",
            };

            var argsClass = new SampleCommandLine_C6();

            clas.ProcessArguments(argsClass, args);
        }
Пример #2
0
        public void Bug_IfPostfixSpecified_ItMustBeUsed()
        {
            b.Info.Flow();
            var clas = new CommandArgumentSupport();

            clas.ArgumentPostfix        = ":";
            clas.ArgumentPrefix         = "";
            clas.ArgumentPrefixOptional = true;


            var argsClass = new SampleCommandLine_C6();

            string[] args = new string[] {
                "firstonethenanother:gloop",
                "firstone:barfle",
                "first:arfle"
            };

            clas.ProcessArguments(argsClass, args);

            Assert.Equal("arfle", argsClass.first);
            Assert.Equal("barfle", argsClass.second);
            Assert.Equal("gloop", argsClass.third);
        }