Exemple #1
0
        public void TestBuildMethodResponseQuery()
        {
            var rpc  = new Matrix.Xmpp.Rpc.Rpc();
            var resp = new MethodResponse();

            var pars = new Parameters {
                "Colorado"
            };

            resp.SetParameters(pars);

            rpc.MethodResponse = resp;
            rpc.ShouldBe(Resource.Get("Xmpp.Rpc.rpc_query_response2.xml"));
        }
Exemple #2
0
        public void TestBuildRpcQuery2()
        {
            var rpc  = new Matrix.Xmpp.Rpc.Rpc();
            var call = new MethodCall {
                MethodName = "examples.getStateName"
            };

            var pars = new Parameters {
                6
            };

            call.SetParameters(pars);

            rpc.MethodCall = call;
            rpc.ShouldBe(Resource.Get("Xmpp.Rpc.rpc_query2.xml"));
        }
Exemple #3
0
        public void TestBuildRpcQuery()
        {
            var rpc        = new Matrix.Xmpp.Rpc.Rpc();
            var methodCall = new MethodCall {
                MethodName = "bid"
            };

            var parameters = new Parameters
            {
                new StructParameter
                {
                    { "symbol", "RHAT" },
                    { "limit", 2.25 },
                    { "expires", new DateTime(2002, 07, 09, 20, 0, 0) }
                }
            };

            methodCall.SetParameters(parameters);
            rpc.MethodCall = methodCall;

            rpc.ShouldBe(Resource.Get("Xmpp.Rpc.rpc_query1.xml"));
        }