Exemplo n.º 1
0
        public async void Get_With_QueryString_test()
        {
            var payload = new FilterRequest
            {
                Category      = "Shoes",
                NumberOfItems = 10
            };

            var response = await _client.GetAsync("api/test", payload);

            var expected = response.ReadAs <FilterRequest>();

            expected.Should().NotBeNull();
            expected.Category.Should().Be(payload.Category);
            expected.NumberOfItems.Should().Be(payload.NumberOfItems);
        }
Exemplo n.º 2
0
        public async void Get_With_QueryString_test()
        {
            var payload = new FilterRequest
            {
                Category = "Shoes",
                NumberOfItems = 10
            };

            var response = await _client.GetAsync("api/test", payload);

            var expected = response.ReadAs<FilterRequest>();
            expected.Should().NotBeNull();
            expected.Category.Should().Be(payload.Category);
            expected.NumberOfItems.Should().Be(payload.NumberOfItems);
        }
Exemplo n.º 3
0
 public FilterRequest FilterProducts([FromUri] FilterRequest request)
 {
     return(request);
 }