Add Day 05 solution

This commit is contained in:
Sebastian Lindemeier
2025-12-05 07:25:59 +01:00
parent 389784ec76
commit 91ea80d2e3
4 changed files with 146 additions and 2 deletions
+47
View File
@@ -0,0 +1,47 @@
using AdvenOfCode.Contracts;
namespace AoC_2025.Tests;
public class Day05Test
{
private readonly IPuzzleSolver<long> _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";
public Day05Test()
{
_sut = new Day05();
}
[Fact]
public void Part01_Test_equals_3()
{
var actual = _sut.SolvePart1(TestInputPath);
Assert.Equal(3, actual);
}
[Fact]
public void Part01_Prod_equals_635()
{
var actual = _sut.SolvePart1(ProdInputPath);
Assert.Equal(635, actual);
}
[Fact]
public void Part02_Test_equals_14()
{
var actual = _sut.SolvePart2(TestInputPath);
Assert.Equal(14, actual);
}
[Fact]
public void Part02_Prod_equals_369761800782619()
{
var actual = _sut.SolvePart2(ProdInputPath);
Assert.Equal(369761800782619, actual);
}
}