Пример #1
0
        public async Task OnLoginUsernameIsInRequestContent(string username)
        {
            _session = new Session("AppKey", username, "Password");
            _session.WithHandler(_httpMessageHandler.Build());
            await _session.LoginAsync();

            _httpMessageHandler.VerifyRequestContent(ContentString(username, "Password"));
        }
Пример #2
0
        public async Task HttpRequestContentBodyIsSet(string method, string parameters)
        {
            await _exchange.SendAsync <dynamic>("endpoint", method, parameters);

            var expected = "{\"jsonrpc\":\"2.0\"," +
                           $"\"method\":\"SportsAPING/v1.0/{method}\"," +
                           $"\"id\":1,\"params\":{parameters}}}";

            _httpMessageHandler.VerifyRequestContent(expected);
        }