public void TestMinComputeLessThanZero() { var service = new ChangeGenerator(); Exception ex = Assert.Throws <ArgumentOutOfRangeException>(() => service.ComputeChange(-1, (list) => { var reducer = new MinReducer(); return(reducer.Reduce(list)); })); }
public void TestMinComputePassOne() { var service = new ChangeGenerator(); var result = service.ComputeChange(103, (list) => { var reducer = new MinReducer(); return(reducer.Reduce(list)); }); Assert.Equal(result.TotalCoins, 4); }