47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using AdvenOfCode.Contracts;
|
|
|
|
namespace AoC_2025.Tests;
|
|
|
|
public class Day08Test
|
|
{
|
|
private readonly Day08 _sut;
|
|
private static readonly string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
|
private readonly string TestInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Test\day08.txt";
|
|
private readonly string ProdInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Prod\day08.txt";
|
|
|
|
public Day08Test()
|
|
{
|
|
_sut = new Day08();
|
|
}
|
|
[Fact]
|
|
public void Part01_Test_equals_40()
|
|
{
|
|
var actual = _sut.SolvePart1(TestInputPath, 10);
|
|
|
|
Assert.Equal(40, actual);
|
|
}
|
|
|
|
[Fact]
|
|
public void Part01_Prod_equals_42840()
|
|
{
|
|
var actual = _sut.SolvePart1(ProdInputPath, 1000);
|
|
|
|
Assert.Equal(42840, actual);
|
|
}
|
|
|
|
[Fact]
|
|
public void Part02_Test_equals_25272()
|
|
{
|
|
var actual = _sut.SolvePart2(TestInputPath);
|
|
|
|
Assert.Equal(25272, actual);
|
|
}
|
|
|
|
[Fact]
|
|
public void Part02_Prod_equals_170629052()
|
|
{
|
|
var actual = _sut.SolvePart2(ProdInputPath);
|
|
|
|
Assert.Equal(170629052, actual);
|
|
}
|
|
} |