public void ShouldNot_GetKNumbersThatSumToN(List <ulong> numbers, int k, ulong n) { var solver = new PuzzleSolverDay1(); var result = solver.GetKNumbersThatSumToN(numbers, k, n); Assert.Empty(result); }
public void Should_GetKNumbersThatSumToN(List <ulong> numbers, int k, ulong n, List <ulong> expected) { var solver = new PuzzleSolverDay1(); var result = solver.GetKNumbersThatSumToN(numbers, k, n); Assert.Equal(expected, result); }
public void ShouldNot_GetKNumbersThatSumToN_TooFewNumbers(List <ulong> numbers, int k, ulong n) { var solver = new PuzzleSolverDay1(); Assert.Throws <ArgumentException>("k", () => solver.GetKNumbersThatSumToN(numbers, k, n)); }