示例#1
0
        public void invalid_response_type()
        {
            var id     = new RequestId(2);
            var result = map.RegisterRequest <int>(id);

            map.OnResponse(RpcResponse.Result(id, "Wrong."));

            Check.That(() => result.IsFaulted);
        }
示例#2
0
        public void request_response()
        {
            var id     = new RequestId(1);
            var result = map.RegisterRequest <string>(id);

            map.OnResponse(RpcResponse.Result(id, "Hello World!"));

            Check.That(() => result.Result == "Hello World!");
        }