public void Returns_the_correct_count_of_dice_for_complex_strings( string input, int expectedCount ) { var result = DiceParser.GetDice(input); Assert.Equal(expectedCount, result.Count()); }
static void Main(string[] args) { var input = string.Join(",", args); Console.WriteLine($"input: {input}"); var dice = DiceParser.GetDice(input).ToList(); Console.WriteLine($"number of dice: {dice?.Count}"); var result = DiceParser.RollDice(dice); Console.WriteLine($"result: {result}"); Console.WriteLine(); }
public void Can_parse_null() { var result = DiceParser.GetDice(null); Assert.NotNull(result); }
public void Can_parse_empty_string() { var result = DiceParser.GetDice(""); Assert.NotNull(result); }