public void ReturnsSingleDigitCombinations(string input, IEnumerable <string> expected) { var target = new TextPredictor(); var actual = target.GetLetterCombinations(input); Assert.Equal(expected, actual); }
public void ReturnsBabyGotBack() { const string expected = "mixalot"; var target = new TextPredictor(); var actual = target.GetLetterCombinations("6492568"); Assert.Contains(expected, actual); }
public void ReturnsExampleDoubleDigitCombinations() { var expected = new[] { "ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf" }; var target = new TextPredictor(); var actual = target.GetLetterCombinations("23"); Assert.Equal(expected, actual); }
public void RejectsNullInput() { var target = new TextPredictor(); Assert.Throws <ArgumentNullException>(() => target.GetLetterCombinations(null)); }
public void RejectsOutOfRangeInput() { var target = new TextPredictor(); Assert.Throws <FormatException>(() => target.GetLetterCombinations("cat")); }