public async Task GetRate_Success()
        {
            var address = new Address(
                Guid.NewGuid(),
                "US",
                "12345",
                "FL",
                "City",
                "street"
                );

            var rateLocation = new TaxJarUsRateLocation(address, _client);
            var rate         = await rateLocation.GetTaxRateAsync();

            Assert.Equal(0.06m, rate.Rate);
        }
        public async Task GetRates_Error()
        {
            var address = new Address(
                Guid.NewGuid(),
                "US",
                "12345",
                "FL",
                "City",
                "street"
                );

            _mockHttpMessageHandler.Protected().Setup <Task <HttpResponseMessage> >("SendAsync",
                                                                                    ItExpr.IsAny <HttpRequestMessage>(), ItExpr.IsAny <CancellationToken>())
            .ReturnsAsync(new HttpResponseMessage()
            {
                StatusCode = HttpStatusCode.BadRequest
            });

            var rateLocation = new TaxJarUsRateLocation(address, _client);

            await Assert.ThrowsAsync <TaxJarRatesLocationException>(() => rateLocation.GetTaxRateAsync());
        }
        public async Task GetRate_Success()
        {
            var address = new Address(
                Guid.NewGuid(),
                "US",
                "12345",
                "FL",
                "City",
                "street"
                );

            _mockHttpMessageHandler.Protected().Setup <Task <HttpResponseMessage> >("SendAsync",
                                                                                    ItExpr.IsAny <HttpRequestMessage>(), ItExpr.IsAny <CancellationToken>())
            .ReturnsAsync(new HttpResponseMessage()
            {
                StatusCode = HttpStatusCode.OK,
                Content    = new StringContent(@"{'rate':{'combined_rate':'1'}}")
            });

            var rateLocation = new TaxJarUsRateLocation(address, _client);
            var rate         = await rateLocation.GetTaxRateAsync();

            Assert.Equal(1m, rate.Rate);
        }