public void WhenQuerying_ThenCanGetTotalCount()
{
var baseUri = new Uri("http://localhost:20000");
var service = new TestService();
var config = new ServiceConfiguration(service);
using (new SafeHostDisposer(
new HttpQueryableServiceHost(typeof(TestService), 25, config, new Uri(baseUri, "products"))))
{
var client = new HttpEntityClient(baseUri);
var products = client.Query<Product>(resourceName, new { search = "kzu" }).Skip(5).Take(10);
var query = products as IHttpEntityQuery<Product>;
var response = query.Execute();
Assert.Equal(2, response.TotalCount);
Assert.Equal(0, response.Count());
Assert.True(response.Response.IsSuccessStatusCode);
}
}