Ejemplo n.º 1
0
        public void BasicVerbParsing_ReturnsTrue()
        {
            var verbOptions = new CliVerbs();
            var arguments   = new[] { "monitor", "-v" };
            var expected    = Runtime.ArgumentParser.ParseArguments(arguments, verbOptions);

            Assert.IsTrue(expected);
        }
Ejemplo n.º 2
0
        public void EmptyArray_ReturnsFalse()
        {
            var verbOptions = new CliVerbs();
            var arguments   = new string[0];
            var expected    = Runtime.ArgumentParser.ParseArguments(arguments, verbOptions);

            Assert.IsFalse(expected);
        }
Ejemplo n.º 3
0
        public void NoValidVerbOptionSelected_ReturnsFalse()
        {
            var verbOptions = new CliVerbs();
            var arguments   = new[] { "option", "-v" };
            var expected    = Runtime.ArgumentParser.ParseArguments(arguments, verbOptions);

            Assert.IsFalse(expected);
            Assert.IsNull(verbOptions.MonitorVerboptions);
            Assert.IsNull(verbOptions.PushVerbOptions);
        }
Ejemplo n.º 4
0
        public void BasicVerbParsing_InstantiatesSelectedVerbOptionProperty()
        {
            var verbOptions = new CliVerbs();
            var arguments   = new[] { "monitor", "-v" };
            var expected    = Runtime.ArgumentParser.ParseArguments(arguments, verbOptions);

            Assert.IsTrue(expected);
            Assert.IsNotNull(verbOptions.MonitorVerboptions);
            Assert.IsNull(verbOptions.PushVerbOptions);
        }