Example #1
0
        public void TestCommandAnalysisNoParameters()
        {
            var analysis = new Command.Analysis("login");

            Assert.AreEqual("login", analysis.Command);
            Assert.AreEqual(0, analysis.Parameters.Length);
        }
Example #2
0
        public void TestCommandAnalysisWithParameters2()
        {
            var analysis = new Command.Analysis("login [ account ,    password][ result ]");

            Assert.AreEqual("login", analysis.Command);
            Assert.AreEqual("result", analysis.Return);
            Assert.AreEqual("account", analysis.Parameters[0]);
            Assert.AreEqual("password", analysis.Parameters[1]);
        }