47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using AdvenOfCode.Contracts;
|
|
|
|
namespace AoC_2026.Tests;
|
|
|
|
public class Day01Test
|
|
{
|
|
private readonly IPuzzleSolver<long> _sut;
|
|
private static readonly string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
|
private readonly string TestInputPath = @$"{rootPath}/AoC-PuzzleInputs/2026/Test/day01.txt";
|
|
private readonly string ProdInputPath = @$"{rootPath}/AoC-PuzzleInputs/2026/Prod/day01.txt";
|
|
|
|
public Day01Test()
|
|
{
|
|
_sut = new Day01();
|
|
}
|
|
[Fact]
|
|
public void Part01_Test_equals_186276()
|
|
{
|
|
var actual = _sut.SolvePart1(TestInputPath);
|
|
|
|
Assert.Equal(186276, actual);
|
|
}
|
|
|
|
[Fact]
|
|
public void Part01_Prod_equals_112105312()
|
|
{
|
|
var actual = _sut.SolvePart1(ProdInputPath);
|
|
|
|
Assert.Equal(112105312, actual);
|
|
}
|
|
|
|
[Fact]
|
|
public void Part02_Test_equals_193050()
|
|
{
|
|
var actual = _sut.SolvePart2(TestInputPath);
|
|
|
|
Assert.Equal(193050, actual);
|
|
}
|
|
|
|
[Fact]
|
|
public void Part02_Prod_equals_142554384()
|
|
{
|
|
var actual = _sut.SolvePart2(ProdInputPath);
|
|
|
|
Assert.Equal(142554384, actual);
|
|
}
|
|
} |