Exemple #1
0
        public async void TaxJarGetRate(string ziptest, string statetest, string citytest, string countrytest, string streettest)
        {
            ReqRates reqRates = new ReqRates()
            {
                zip     = ziptest,
                state   = statetest,
                city    = citytest,
                country = countrytest,
                street  = streettest
            };

            TaxJar taxJar = new TaxJar();

            Assert.Equal(0.09, await taxJar.GetRate(reqRates));
        }
Exemple #2
0
        public async void TaxServiceGetRate(string ziptest, string statetest, string citytest, string countrytest, string streettest)
        {
            ReqRates reqRates = new ReqRates()
            {
                zip     = ziptest,
                state   = statetest,
                city    = citytest,
                country = countrytest,
                street  = streettest
            };

            taxCalculator.Setup(x => x.GetRate(reqRates)).Returns(Task.FromResult(0.09));

            TaxCalculator taxService = new TaxCalculator(taxCalculator.Object);

            Assert.Equal(0.09, await taxService.GetRate(reqRates));
        }