Esempio n. 1
0
        public async Task Get_the_most_expensive_product_untyped()
        {
            var result = (double)await _client
                         .FindScalarAsync("Products/Default.MostExpensive()");

            Assert.InRange(result, 500, 1000);
        }
Esempio n. 2
0
    public async Task Get_the_most_expensive_product_untyped()
    {
        var settings = CreateDefaultSettings().WithHttpMock();
        var client   = new ODataClient(settings);
        var result   = (double)await client
                       .FindScalarAsync("Products/Default.MostExpensive()").ConfigureAwait(false);

        Assert.InRange(result, 500, 1000);
    }
Esempio n. 3
0
    public async Task Get_the_sales_tax_untyped()
    {
        var settings = CreateDefaultSettings().WithHttpMock();
        var client   = new ODataClient(settings);
        var result   = (double)await client
                       .FindScalarAsync("Products(33)/Default.CalculateGeneralSalesTax(state='WA')").ConfigureAwait(false);

        Assert.InRange(result, 1, 200);
    }
Esempio n. 4
0
    public async Task Get_the_rank_of_the_product_price_untyped()
    {
        var settings = CreateDefaultSettings().WithHttpMock();
        var client   = new ODataClient(settings);
        var result   = (int)await client
                       .FindScalarAsync("Products(33)/Default.GetPriceRank()").ConfigureAwait(false);

        Assert.InRange(result, 0, 100);
    }