public void InIt() { _mockData = new List <string>() { "L.LL.LL.LL", "LLLLLLL.LL", "L.L.L..L..", "LLLL.LL.LL", "L.LL.LL.LL", "L.LLLLL.LL", "..L.L.....", "LLLLLLLLLL", "L.LLLLLL.L", "L.LLLLL.LL" //"#.##.##.##", //"#######.##", //"#.#.#..#..", //"####.##.##", //"#.##.##.##", //"#.#####.##", //"..#.#.....", //"##########", //"#.######.#", //"#.#####.##" }; var autoMocker = new AutoMoqer(); _fileReaderMock = autoMocker.GetMock <IFileReader>(); _fileReaderMock.Setup(f => f.ReadFileToStringArray(It.IsAny <string>())).Returns(_mockData); _solution = new Day11Solution(_fileReaderMock.Object); }
public void SolvesPart2(int serial, int x, int y, int size) { var subject = new Day11Solution(); (int, int, int)result = subject.SolvePart2(serial); result.Should().Be((x, y, size)); }
public void SolvesPart1() { var subject = new Day11Solution(); (int, int)result = subject.SolvePart1(18); result.Should().Be((33, 45)); }
public void CalculatesPowerLevel(int x, int y, int serialNumber, int expected) { var subject = new Day11Solution(); int result = subject.PowerLevel(x, y, serialNumber); result.Should().Be(expected); }