Esempio 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);
        }
Esempio 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);
        }
Esempio n. 3
0
 public FilterRequest FilterProducts([FromUri] FilterRequest request)
 {
     return(request);
 }