コード例 #1
0
        public void Does_SendPut_as_PUT()
        {
            var client  = Config.CreateClient();
            var request = new SendPut {
                Id = 1
            };
            var response = client.Send(request);

            Assert.That(response.Id, Is.EqualTo(1));
            Assert.That(response.RequestMethod, Is.EqualTo(HttpMethods.Put));
            Assert.That(response.PathInfo, Is.EqualTo("/json/reply/SendPut"));
        }
コード例 #2
0
        public async Task Does_SendPut_as_PUT()
        {
            var client  = Config.CreateClient();
            var request = new SendPut {
                Id = 1
            };
            var response = await client.SendAsync(request).ConfigureAwait(false);

            Assert.That(response.Id, Is.EqualTo(1));
            Assert.That(response.RequestMethod, Is.EqualTo(HttpMethods.Put));
            Assert.That(response.PathInfo, Is.EqualTo("/json/reply/SendPut"));
        }