public void NotFail() { NumberToken command = new NumberToken(); var result = command.Process(new InputStack()); Assert.Null(result); }
public void ReturnNumberWithDigitInput(string text, int expectedResultValue) { NumberToken command = new NumberToken(); var stack = new InputStack(text); var result = command.Process(stack); Assert.NotNull(result); Assert.Equal(expectedResultValue, result.Value); Assert.Equal(0, result.Score); }
public void ReturnMultipleResultsNumberWithDigitInput(string text, params int[] expectedResultValues) { NumberToken command = new NumberToken(); var stack = new InputStack(text); Assert.Equal(expectedResultValues.Length, stack.Count); for (int i = 0; i < stack.Count; i++) { var result = command.Process(stack); stack.Pop(); Assert.NotNull(result); Assert.Equal(expectedResultValues[i], result.Value); Assert.Equal(0, result.Score); } }