public void TooManyArguments()
        {
            string rawQuery = string.Format("test {0} {1} {2} {0}", TEST_INT.ToString(), TEST_BOOL.ToString(), TEST_STRING);
            Query  query    = m_Console.ParseQuery(rawQuery)[0];

            try
            {
                m_Command.Method.MapArguments(query);
                TestHelper.ExpectException <TooManyArgumentsException>();
            }
            catch (TooManyArgumentsException e)
            {
                Assert.AreEqual(3, e.Expected);
                Assert.AreEqual(4, e.Received);
            }
        }
Esempio n. 2
0
        public void BasicParseQuery()
        {
            List <Query> queries = m_Console.ParseQuery("test; test");

            Assert.AreEqual(2, queries.Count);             //proper query parsing is tested in QueryParserTest class
        }