Example #1
0
        public void ParseTest()
        {
            var conv = CLConvFactory.Create();

            conv.AddType <SwitchA>();
            conv.AddType <SwitchB>();
            conv.AddType <SwitchC>();
            var help = new ManualBuilder(conv);

            help.Build();
            Assert.AreEqual(
                Resources.CL_ManualBuilder_Result.Replace("\r\n", "\n").Replace("\n\r", "\n").Replace('\r', '\n'),
                help.ToString().Replace("\r\n", "\n").Replace("\n\r", "\n").Replace('\r', '\n')
                );
        }
Example #2
0
 private static CommandLineConverter Create()
 {
     // CommandLineParser は抽象型なので、
     // CommandLineConverter を利用して実験する。
     return(CLConvFactory.Create(
                "command", "a", "b", "c",
                "-o",
                "--option",
                "/S",
                "/switch", "val0", "val1",
                "-x", "val2", "val3",
                "-y",
                "--z",
                "/", "a",
                "-", "abc",
                "/123",
                "!/123", "!!!", "#--aa"
                ));
 }
 private static CommandLineConverter Create()
 {
     return(CLConvFactory.Create("command", "/files", "--input", "abc.xyz", "/files", "123456"));
 }