public void Part1() { AdapterTester adapterTester = new AdapterTester(StringListRetriever.Retreive("InputList10.txt").Select(x => int.Parse(x)).ToList()); Dictionary <int, int> results = adapterTester.ComputeJoltageDifferences(); int answer = results[1] * (results[3] + 1); Assert.Equal(1914, answer); }
public void Part1Sample() { AdapterTester smallDataSetTester = new AdapterTester(GetSmallSampleDataSet()); Dictionary <int, int> smallDataSetResults = smallDataSetTester.ComputeJoltageDifferences(); Assert.Equal(7, smallDataSetResults[1]); Assert.Equal(4, smallDataSetResults[3]); AdapterTester largeDataSetTester = new AdapterTester(GetLargeSampleDataSet()); Dictionary <int, int> largeDataSetResults = largeDataSetTester.ComputeJoltageDifferences(); Assert.Equal(22, largeDataSetResults[1]); Assert.Equal(9, largeDataSetResults[3]); }
[Fact]// (Skip="Runs too long")] public void Part2() { AdapterTester adapterTester = new AdapterTester(StringListRetriever.Retreive("InputList10.txt").Select(x => int.Parse(x)).ToList()); Assert.Equal(9256148959232, adapterTester.GetJoltageArrangementCount()); }
public void Part2LargeSample() { AdapterTester largeDataSetTester = new AdapterTester(GetLargeSampleDataSet()); Assert.Equal(19208, largeDataSetTester.GetJoltageArrangementCount()); }
public void Part2SmallSample() { AdapterTester smallDataSetTester = new AdapterTester(GetSmallSampleDataSet()); Assert.Equal(8, smallDataSetTester.GetJoltageArrangementCount()); }