public void Day11_FullTest() { var data = TestUtil.GetFileContentsAsString("Day11.txt"); Assert.AreEqual(2438, new SeatCalculator().CalculateTakenSeats(data)); Assert.AreEqual(2174, new SeatCalculator().CalculateTakenSeats(data, true)); }
public void TestPart2_Full() { var data = TestUtil.GetFileContentsAsString("Day18.txt").Split(Environment.NewLine); var sum = data.Select(OperationOrder.CalculateLineForPartTwo).Sum(); Assert.AreEqual(231235959382961, sum); }
public void Day12_FullTest01() { var data = TestUtil.GetFileContentsAsString("Day12.txt").Split(Environment.NewLine); Assert.AreEqual(938, RainRisk.CalculateDistance(data)); Assert.AreEqual(54404, RainRisk.CalculateDistanceWithWaypoint(data)); }
public void Setup() { _input = TestUtil .GetFileContentsAsString("Day2.txt") .Split(Environment.NewLine) .Select(PasswordPolicy.Parse) .ToArray(); }
public void Day08_Full() { var input = TestUtil .GetFileContentsAsString("Day8.txt") .Split(Environment.NewLine); var output = GameConsole.GetLastValueBeforeInfiniteLoop(input); Assert.AreEqual(1563, output); }
public void Day07_Full() { var input = TestUtil .GetFileContentsAsString("Day7.txt") .Split(Environment.NewLine); var output = BagCounter.GetOuterBagCount(input, "shiny gold"); Assert.AreEqual(259, output.Part1); Assert.AreEqual(45018, output.Part2); }
public void Day08_Full_02() { var input = TestUtil .GetFileContentsAsString("Day8.txt") .Split(Environment.NewLine); var output = GameConsole.GetValue(input); // 2604 == too high Assert.AreEqual(767, output); }
public void Day14_Full_Part2() { var data = TestUtil.GetFileContentsAsString("Day14.txt").Split(Environment.NewLine); Assert.AreEqual(3296185383161, DockingData.Part2(data)); }
public void Day14_Full_Part1() { var data = TestUtil.GetFileContentsAsString("Day14.txt").Split(Environment.NewLine); Assert.AreEqual(14862056079561, DockingData.Part1(data)); }
public void TestPart02() { var data = TestUtil.GetFileContentsAsString("Day16.txt"); Assert.AreEqual(2355350878831, TicketTranslation.GetTicketDepartureFieldCount(data.Split(Environment.NewLine + Environment.NewLine).Select(x => x.Split(Environment.NewLine).ToList()).ToList())); }
public void Setup() { _items = TestUtil .GetFileContentsAsString("Day3.txt") .Split(Environment.NewLine); }
public void Day13_Full_Test02() { var data = TestUtil.GetFileContentsAsString("Day13.txt").Split(Environment.NewLine); Assert.AreEqual(600689120448303, ShuttleSearch.GetLastPart(data[1])); }
public void Day13_Full_Test01() { var data = TestUtil.GetFileContentsAsString("Day13.txt").Split(Environment.NewLine); Assert.AreEqual(3385, ShuttleSearch.GetEarliestCalculatedTimestamp(data)); }
public void Part2() { var input = TestUtil.GetFileContentsAsString("Day17.txt"); Assert.AreEqual(1792, new ConwayRecordHyperCubeCalculator().GetActiveCubes(6, input)); }
public void Part1() { var input = TestUtil.GetFileContentsAsString("Day17.txt"); Assert.AreEqual(298, ConwayRecordCalculator.GetActiveCubes(6, input)); }
public void Setup() { _items = TestUtil .GetFileContentsAsString("Day4.txt"); }
public void TestPart01() { var data = TestUtil.GetFileContentsAsString("Day16.txt"); Assert.AreEqual(18227, TicketTranslation.GetTicketScanningErrorRate(data.Split(Environment.NewLine + Environment.NewLine).Select(x => x.Split(Environment.NewLine).ToList()).ToList())); }