public void GetRate_EmptyZipTest()
        {
            TaxJar       taxJar       = new TaxJar();
            RateResponse rateResponse = new RateResponse();

            string zip = "";

            var taxService = new TaxService.TaxService();

            Task.Run(async() =>
            {
                rateResponse.Rate = await taxService.GetRate(taxJar, zip);
            });

            Assert.IsNull(rateResponse.Rate);
        }
示例#2
0
        public void GetRate_SantaMonicaZipTest()
        {
            TaxJar       taxJar       = new TaxJar();
            RateResponse rateResponse = new RateResponse();

            //zip of city of Santa Monica
            string zip = "90404";

            var taxService = new TaxService.TaxService();

            Task.Run(async() =>
            {
                rateResponse.Rate = await taxService.GetRate(taxJar, zip);
            });

            Assert.IsTrue(rateResponse.Rate.City.Equals("SANTA MONICA"));
        }