Esempio n. 1
0
        public void MissingSwitchesWhenAllSuppliedIsCorrect()
        {
            CmdFlag[] allowedFlags = { new CmdFlag("i", true), new CmdFlag("o", true), new CmdFlag("v", false) };
            CmdLine   cmd          = new CmdLine(allowedFlags);

            string[] args    = { @"-ie:\data\dl\test.txt", @"-oe:\data\dl\test.out" };
            bool     success = cmd.ProcessCmdLine(args); // parse the command line

            Assert.IsTrue(success, "success is false");
            var switches = cmd.GetMissingSwitchesRequired().ToArray();

            Assert.AreEqual(0, switches.Length, "switches has elements");
        }