Beispiel #1
0
        public void Should_FindCommandThatCauseInfiniteLoopData(List <CommandDay8> commands, CommandDay8b expected)
        {
            var solver = new PuzzleSolverDay8();
            var result = solver.FindCommandThatCauseInfiniteLoopData(commands);

            result.Should().BeEquivalentTo(expected);
        }
Beispiel #2
0
        public void Should_CountAccumulator(List <CommandDay8> commands, int expected)
        {
            var solver = new PuzzleSolverDay8();
            var result = solver.CountAccumulator(commands);

            Assert.Equal(expected, result);
        }
Beispiel #3
0
        public void ShouldNot_FindCommandThatCauseInfiniteLoopData(List <CommandDay8> commands)
        {
            var solver = new PuzzleSolverDay8();

            Assert.Throws <Exception>(() => solver.FindCommandThatCauseInfiniteLoopData(commands));
        }