47 lines
1.1 KiB
C#
47 lines
1.1 KiB
C#
using AdvenOfCode.Contracts;
|
|
|
|
namespace AoC_2025.Tests;
|
|
|
|
public class Day04Test
|
|
{
|
|
private readonly IPuzzleSolver<long> _sut;
|
|
private static readonly string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
|
private readonly string TestInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Test\day04.txt";
|
|
private readonly string ProdInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Prod\day04.txt";
|
|
|
|
public Day04Test()
|
|
{
|
|
_sut = new Day04();
|
|
}
|
|
[Fact]
|
|
public void Part01_Test_equals_13()
|
|
{
|
|
var actual = _sut.SolvePart1(TestInputPath);
|
|
|
|
Assert.Equal(13, actual);
|
|
}
|
|
|
|
[Fact]
|
|
public void Part01_Prod_equals_1411()
|
|
{
|
|
var actual = _sut.SolvePart1(ProdInputPath);
|
|
|
|
Assert.Equal(1411, actual);
|
|
}
|
|
|
|
[Fact]
|
|
public void Part02_Test_equals_43()
|
|
{
|
|
var actual = _sut.SolvePart2(TestInputPath);
|
|
|
|
Assert.Equal(43, actual);
|
|
}
|
|
|
|
[Fact]
|
|
public void Part02_Prod_equals_8557()
|
|
{
|
|
var actual = _sut.SolvePart2(ProdInputPath);
|
|
|
|
Assert.Equal(8557, actual);
|
|
}
|
|
} |