-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
27 lines (19 loc) · 913 Bytes
/
Copy pathProgram.cs
File metadata and controls
27 lines (19 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// See https://aka.ms/new-console-template for more information
using TaxCalculatorInterviewTests;
TaxCalculator tx = new TaxCalculator();
tx.SetCustomTaxRate(Commodity.Literature, 3);
tx.SetCustomTaxRate(Commodity.Transport, 3);
tx.SetCustomTaxRate(Commodity.Alcohol, 6);
tx.SetCustomTaxRate(Commodity.Default, 6);
tx.SetCustomTaxRate(Commodity.FoodServices, 9);
tx.SetCustomTaxRate(Commodity.Food, 9);
//tx.SetCustomTaxRate(Commodity.CulturalServices, 10);
foreach (var kvp in TaxCalculator._customRates)
{
if(kvp!=null)
Console.WriteLine("Commodity = [0], Date = {1}, Rate = {2}", kvp.Item1, kvp.Item2, kvp.Item3);
}
var taxvalue = tx.GetTaxRateForDateTime(Commodity.Literature, DateTime.Now);
Console.WriteLine("GetTaxRateForDateTime"+ " :: " + taxvalue);
var currentvalue = tx.GetCurrentTaxRate(Commodity.CulturalServices);
Console.WriteLine("GetCurrentTaxRate" + " :: " + currentvalue);