Esempio n. 1
0
        public void TestMinOccursExpect2ButNull()
        {
            var options = new MaxOccursOptions();

            var s = OptionsValidator.AnalyzeAssignedOptions(options);

            System.Diagnostics.Debug.WriteLine(s);
            Assert.AreEqual(1, s.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries).Length);
        }
Esempio n. 2
0
        public void TestMinOccursExpect2But1()
        {
            var options = new MaxOccursOptions();

            var parser = new CommandLineParser(options);

            parser.Parse("/Files:abc ", false);
            var s = parser.ErrorMessage;

            System.Diagnostics.Debug.WriteLine(s);
            Assert.AreEqual(1, s.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries).Length);
        }
Esempio n. 3
0
        public void TestMaxOccurs()
        {
            var options = new MaxOccursOptions
            {
                Files = new string[] { "abc", "efg", "hkkjk", "444" },
            };

            var s = OptionsValidator.AnalyzeAssignedOptions(options);

            System.Diagnostics.Debug.WriteLine(s);
            Assert.AreEqual(1, s.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries).Length);
        }
Esempio n. 4
0
        public void TestMaxOccursOK()
        {
            var options = new MaxOccursOptions();

            var parser = new CommandLineParser(options);

            parser.Parse("/Files:abc efg", false);
            var s = parser.ErrorMessage;

            System.Diagnostics.Debug.WriteLine(s);
            Assert.IsNull(s);
        }