static async Task Main(string[] args) { Console.OutputEncoding = Encoding.UTF8; var toExit = false; var calculator = CalculatorBuilder.Create(TariffProviderType.InMemory); foreach (var input in args) { toExit = await Calculate(calculator, input); if (toExit) { break; } } while (!toExit) { Console.WriteLine("For exit please type 'exit'."); Console.WriteLine("Please provide consumption:"); var inputStr = Console.ReadLine(); foreach (var input in inputStr.Split(' ')) { toExit = await Calculate(calculator, input); if (toExit) { break; } } } ; Console.WriteLine("Thanks for using this product!"); }
public AnnualFeeCalculatorTests() { this.calculator = CalculatorBuilder.Create(CalculatorBuilder.TariffProviderType.InMemory); }
public void CalculatorNotNull() { var calculator = CalculatorBuilder.Create(CalculatorBuilder.TariffProviderType.InMemory); Assert.IsNotNull(calculator); }