コード例 #1
0
        public void OptionStyleApplicationUsage()
        {
            var a = new OptionsApplication();
            var e = GetOpt.Run(a, new[] { "--help" });

            Assert.AreEqual(0, e);
        }
コード例 #2
0
        public void OptionStyleApplication()
        {
            var args = Enumerable.Range(0, 10).Select(_ => _.ToString()).ToArray();
            var a    = new OptionsApplication();
            var e    = GetOpt.Run(a, args);

            Assert.AreEqual(0, e);
            Assert.IsTrue(args.SequenceEqual(a.arguments), string.Join(",", a.arguments));
        }