public void InterpretCalculatorInput_NumbersOver1000Excluded_ReturnSuccessful() { string userInput = @"2,1001,6"; CalculatorInputHandler calculatorInputHandler = new CalculatorInputHandler(); calculatorInputHandler.ReplaceAlternativeDelimiterWithArgumentDelimiter("|"); CalculatorInput calculatorInput = calculatorInputHandler.InterpretCalculatorInput(userInput); Assert.IsTrue(calculatorInput.Numbers.Count == 2); Assert.IsTrue(calculatorInput.Numbers[0] == 2); Assert.IsTrue(calculatorInput.Numbers[1] == 6); }
public void InterpretCalculatorInput_MultipleValidNumbersWithCommaAndArgumentDelimiters_ReturnSuccessful() { string userInput = @"1|2,3"; CalculatorInputHandler calculatorInputHandler = new CalculatorInputHandler(); calculatorInputHandler.ReplaceAlternativeDelimiterWithArgumentDelimiter("|"); CalculatorInput calculatorInput = calculatorInputHandler.InterpretCalculatorInput(userInput); Assert.IsTrue(calculatorInput.Numbers.Count == 3); Assert.IsTrue(calculatorInput.Numbers[0] == 1); Assert.IsTrue(calculatorInput.Numbers[1] == 2); Assert.IsTrue(calculatorInput.Numbers[2] == 3); }