public void Greater_or_equal_to_hundred_tax_rate_should_throw_exception() { const decimal taxRate = 110m; var taxStore = new TaxRepository(); taxStore.StoreTaxRate(taxRate); }
public void Less_or_equal_than_zero_tax_rate_should_throw_exception() { const decimal taxRate = -10m; var taxStore = new TaxRepository(); taxStore.StoreTaxRate(taxRate); }
private static TaxRepository StoreTaxRate() { Console.WriteLine("------------------------- Site Administrator ---------------"); Console.WriteLine("Please Enter tax rate:"); var taxRate = decimal.Parse(Console.ReadLine()); var taxRepository = new TaxRepository(); taxRepository.StoreTaxRate(taxRate); return(taxRepository); }
public void Stored_tax_rate_should_be_retrievable() { const decimal taxRate = 25m; var taxStore = new TaxRepository(); taxStore.StoreTaxRate(taxRate); var taxRateValue = taxStore.RetrieveTaxRate(); Assert.AreEqual(taxRate, taxRateValue); }