예제 #1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public RequestCmd AddQuery(string pScript, IDictionary <string, IWeaverQueryVal> pParams)
        {
            string[] args = WeaverUtil.GetScriptAndParamJson(pScript, pParams);

            RequestCmd rc = new RequestCmd(RexConn.Command.Query.ToString().ToLower(), args);

            CmdList.Add(rc);
            return(rc);
        }
예제 #2
0
        /*--------------------------------------------------------------------------------------------*/
        public void AssertScriptAndParams(string pScript, IDictionary <string, IWeaverQueryVal> pParams,
                                          string pExpectScript, string pExpectParamJson)
        {
            string[] args = WeaverUtil.GetScriptAndParamJson(pScript, pParams);

            Assert.NotNull(args, "Result should be filled.");
            Assert.AreEqual((pExpectParamJson == null ? 1 : 2), args.Length,
                            "Incorrect argument count.");
            Assert.AreEqual(pExpectScript, args[0], "Incorrect script argument.");

            if (pExpectParamJson != null)
            {
                Assert.AreEqual(pExpectParamJson, args[1], "Incorrect parameters argument.");
            }
        }