public void SolveSecondPuzzle() { var sut = new XmasExploit(PuzzleData.PUZZLE_DATA, 25); var result = sut.FindExploit(); Assert.Equal(4023754, result); }
public void FindContiguousSetOfNumbersAdding127() { long[] preamble = { 35, 20, 15, 25, 47, 40, 62, 55, 65, 95, 102, 117, 150, 182, 127, 219, 299, 277, 309, 576 }; var sut = new XmasExploit(preamble, 5); Assert.Equal(62, sut.FindExploit()); }
public void ReturnNegative_WhenFindExploitCannotSolveIt() { long[] preamble = { 35, 20, 15, 0, 47, 40, 62, 55, 65, 95, 102, 117, 150, 182, 127, 219, 299, 277, 309, 576 }; var sut = new XmasExploit(preamble, 5); Assert.Equal(-1, sut.FindExploit()); }