public void TestPartOne3() { StringInput input = new StringInput("R5", "L5", "R5", "R3"); Day1Solver solution = new Day1Solver(); solution.GetSolution(input).FirstPart.Should().Be("12"); }
public void TestPartTwo1() { StringInput input = new StringInput("R8", "R4", "R4", "R8"); Day1Solver solution = new Day1Solver(); solution.GetSolution(input).SecondPart.Should().Be("4"); }
public void Test2() { var solver = new Day1Solver(); var result = solver.CalculateFuel(100756); Assert.AreEqual(result, 33583); }
public void Test1() { var solver = new Day1Solver(); var result = solver.CalculateFuel(1969); Assert.AreEqual(result, 654); }
static void Main(string[] args) { var content = InputFileReader.ReadFileAsLines(1, 1); Console.WriteLine($"Day 1 Solution 1:{Day1Solver.Solution1(content)}"); Console.ReadLine(); }
public void TestPart2Solution(string inputFile, int expected) { // Arrange string[] lines = System.IO.File.ReadAllLines($"../../../{inputFile}"); // Act var result = Day1Solver.Part2Solution(lines); // Assert Assert.Equal(expected, result); }
public void Day1PartTwoActual() { // Arrange var challengeSolver = new Day1Solver(); var input = GetChallengeInputDay1(); // Act var result = challengeSolver.SolveDay1B(input); // Assert Assert.AreEqual(195700142, result); }
public void Day1Actual() { // Arrange var challengeSolver = new Day1Solver(); var input = GetChallengeInputDay1(); // Act var result = challengeSolver.SolveDay1(input); // Assert Assert.AreEqual(921504, result); }
static bool testDay1() { Day1Solver day1Solver = new Day1Solver("../PuzzleInputs/Day1/input.txt"); TwoPartPuzzleOutput twoPartPuzzleOutput = day1Solver.Solve() as TwoPartPuzzleOutput; if ((long)twoPartPuzzleOutput.Part1.Output != 472L) { System.Console.WriteLine($"Day1 Part1 solver solution is {twoPartPuzzleOutput.Part1.Output} when it should have been 472"); return(false); } if ((long)twoPartPuzzleOutput.Part2.Output != 66932) { System.Console.WriteLine($"Day1 Part2 solver solution is {twoPartPuzzleOutput.Part2.Output} when it should have been 66932"); return(false); } return(true); }
public void Day1Test() { // Arrange var testData = new List <int>() { 1721, 979, 366, 299, 675, 1456, }; var challengeSolver = new Day1Solver(); // Act var result = challengeSolver.SolveDay1(testData); // Assert Assert.AreEqual(514579, result); }
public void SetUp() { _solver = new Day1Solver(); }
public void SetUp() { _solver = new Day1Solver(); _parser = new Day1Parser(); }