Refactor Day04 to use Index() extension method

This commit is contained in:
Sebastian Lindemeier
2025-12-05 09:04:27 +01:00
parent 0d028c4282
commit 31caf429ca
2 changed files with 22 additions and 5 deletions
+17 -1
View File
@@ -4,7 +4,7 @@ namespace AoC_2025.Tests;
public class Day05Test
{
private readonly IPuzzleSolver<long> _sut;
private readonly Day05 _sut;
private static readonly string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
private readonly string TestInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Test\day05.txt";
private readonly string ProdInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Prod\day05.txt";
@@ -44,4 +44,20 @@ public class Day05Test
Assert.Equal(369761800782619, actual);
}
[Fact]
public void Part02Again_Test_equals_14()
{
var actual = _sut.SolvePart2Again(TestInputPath);
Assert.Equal(14, actual);
}
[Fact]
public void Part02Again_Prod_equals_369761800782619()
{
var actual = _sut.SolvePart2Again(ProdInputPath);
Assert.Equal(369761800782619, actual);
}
}