public void TestCreateInstructionList() { string[] testData = BootExecutor.GetInputData(FilePathTestData); List <BootExecutor> instructionList = BootExecutor.CreateInstructionList(testData); Assert.AreEqual(9, instructionList.Count); }
public void FindAnswerDayEightPuzzleOne() { string[] testData = BootExecutor.GetInputData(FilePathInputData); List <BootExecutor> instructionList = BootExecutor.CreateInstructionList(testData); int accumulator = BootExecutor.RunBoot(instructionList); Assert.AreEqual(1797, accumulator); }
public void TestRunBoot() { string[] testData = BootExecutor.GetInputData(FilePathTestData); List <BootExecutor> instructionList = BootExecutor.CreateInstructionList(testData); int accumulator = BootExecutor.RunBoot(instructionList); Assert.AreEqual(5, accumulator); }
public void TestBootExecutorConstructor() { var instruction = new BootExecutor("nop +0"); Assert.AreEqual("nop", instruction.Instruction); Assert.AreEqual(0, instruction.Argument); Assert.AreEqual(0, instruction.Visits); }
public void FindAnswerDayEightPuzzleTwo() { string[] testData = BootExecutor.GetInputData(FilePathInputData2); List <BootExecutor> instructionList = BootExecutor.CreateInstructionList(testData); int accumulator = BootExecutor.RunBoot(instructionList); Assert.Warn("Not solved"); // Assert.Less(accumulator, 1752); // Assert.AreEqual(1797, accumulator); }
public void TestGetInputData() { string[] testData = BootExecutor.GetInputData(FilePathTestData); Assert.AreEqual(9, testData.GetLength(0)); Assert.AreEqual("nop +0", testData[0]); }