示例#1
0
文件: Tests.cs 项目: kurtaj/CLAP
        public void RegisterEmptyHelpHandler_MoreThanOnce_Exception()
        {
            var p = new Parser<Sample_25>();

            p.RegisterEmptyHelpHandler(delegate { });
            p.RegisterEmptyHelpHandler(delegate { });
        }
示例#2
0
文件: Tests.cs 项目: kurtaj/CLAP
        public void RegisterEmptyHelpHandler_Called()
        {
            var p = new Parser<Sample_25>();

            string help = null;

            p.RegisterEmptyHelpHandler(h => help = h);

            Assert.IsNull(help);

            p.Run(new string[] { });

            Assert.IsNotNull(help);
        }