コード例 #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);
        }
コード例 #2
0
ファイル: HttpwrapTests.cs プロジェクト: mustafagenc/Httwrap
        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);
        }
コード例 #3
0
ファイル: TestController.cs プロジェクト: ziyasal/Httwrap
 public FilterRequest FilterProducts([FromUri] FilterRequest request)
 {
     return(request);
 }