public void ShouldValidateDataCorrectly(string datafile, bool result) { List <string> input = ParseInput(datafile); using (AOC aoc = new AOC()) { var data = aoc.ProcessData(input); Assert.Equal(result, aoc.ValidateInstructions(data)); } }
public void ShouldFindValidInstructionSet(string datafile, int result) { List <string> input = ParseInput(datafile); using (AOC aoc = new AOC()) { var data = aoc.ProcessData(input); var validInstructions = aoc.FindValidInstructionSet(data); Assert.Equal(true, aoc.ValidateInstructions(validInstructions)); int accumulator = aoc.ExecuteInstructions(validInstructions); Assert.Equal(result, accumulator); } }