コード例 #1
0
        public void Does_SendRestGet_as_GET_using_User_Defined_Route()
        {
            var client  = Config.CreateClient();
            var request = new SendRestGet {
                Id = 1
            };

            var response = client.Send(request);

            Assert.That(response.Id, Is.EqualTo(1));
            Assert.That(response.RequestMethod, Is.EqualTo(HttpMethods.Get));
            Assert.That(response.PathInfo, Is.EqualTo("/sendrestget/1"));
        }
コード例 #2
0
        public async Task Does_SendRestGet_as_GET_using_Predefined_Route()
        {
            var client  = Config.CreateClient();
            var request = new SendRestGet {
                Id = 1
            };

            var response = await client.SendAsync(request).ConfigureAwait(false);

            Assert.That(response.Id, Is.EqualTo(1));
            Assert.That(response.RequestMethod, Is.EqualTo(HttpMethods.Get));
            Assert.That(response.PathInfo, Is.EqualTo("/sendrestget/1"));
        }