public void emptyArgsHasZeroSetFlags()
        {
            var kataArgs = new KataArgs();

            kataArgs.ParseArgs(new List <string>());
            Assert.AreEqual(0, kataArgs.Size);
        }
        public void nonSetFlagReturnsNull()
        {
            var kataArgs = new KataArgs();

            kataArgs.ParseArgs(new List <string> {
                "-p", "8080"
            });
            Assert.AreEqual(null, kataArgs.GetFlagValue("l"));
        }
        public void secondPortFlagHasCorrectValue()
        {
            var kataArgs = new KataArgs();

            kataArgs.ParseArgs(new List <string> {
                "-l", "-p", "8080"
            });
            Assert.AreEqual("8080", kataArgs.GetFlagValue("p"));
        }
        public void oneFlagWithoutValueAndOneFlagWithValueHasSizeTwo()
        {
            var kataArgs = new KataArgs();

            kataArgs.ParseArgs(new List <string> {
                "-l", "-p", "8080"
            });
            Assert.AreEqual(2, kataArgs.Size);
        }
        public void twoArgFlagWithStringValueHasSizeTwo()
        {
            var kataArgs = new KataArgs();

            kataArgs.ParseArgs(new List <string> {
                "-l", "a", "-p", "8080"
            });
            Assert.AreEqual(2, kataArgs.Size);
        }
        public void oneArgFlagWithStringValueHasSizeOne()
        {
            var kataArgs = new KataArgs();

            kataArgs.ParseArgs(new List <string> {
                "-l", "a"
            });
            Assert.AreEqual(1, kataArgs.Size);
        }
        public void oneArgSetsOneFlag()
        {
            var kataArgs = new KataArgs();

            kataArgs.ParseArgs(new List <string> {
                "-l"
            });
            Assert.AreEqual(1, kataArgs.Size);
        }
        public void noArgumentsParsedWithEmptySchema()
        {
            var kataArgs = new KataArgs();
            var schema   = new Dictionary <string, string>();

            kataArgs.ParseArgs(new List <string> {
                "-l"
            }, schema);
            Assert.AreEqual(null, kataArgs.GetFlagValue("l"));
        }