Exemplo n.º 1
0
        public void TestMaxOccursSilly()
        {
            var options = new MaxOccursOptionsSilly
            {
                Silly = "kk"
            };

            var s = OptionsValidator.AnalyzeAssignedOptions(options);

            System.Diagnostics.Debug.WriteLine(s);
            Assert.AreEqual(1, s.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries).Length);
        }
Exemplo n.º 2
0
        public void TestMaxOccursSilly()
        {
            var options = new MaxOccursOptionsSilly
            {
                Silly = "kk"
            };

            var parser = new CommandLineParser(options);

            parser.Parse("/Silly:kk", false);
            var s = parser.ErrorMessage;

            System.Diagnostics.Debug.WriteLine(s);
            Assert.AreEqual(1, s.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries).Length);
        }