AdventOfCode/AoC_2025.Tests/Day09Test.cs

57 lines
1.5 KiB
C#

using AdvenOfCode.Contracts;
namespace AoC_2025.Tests;
public class Day09Test
{
private IPuzzleSolver<long> _sut;
private static readonly string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
private readonly string TestInputPath = @$"{rootPath}/AoC-PuzzleInputs/2025/Test/day09.txt";
private readonly string Test2InputPath = @$"{rootPath}/AoC-PuzzleInputs/2025/Test/day09_2.txt";
private readonly string ProdInputPath = @$"{rootPath}/AoC-PuzzleInputs/2025/Prod/day09.txt";
public Day09Test()
{
_sut = new Day09();
}
[Fact]
public void Part01_Test_equals_50()
{
var actual = _sut.SolvePart1(TestInputPath);
Assert.Equal(50, actual);
}
[Fact]
public void Part01_Prod_equals_4754955192()
{
var actual = _sut.SolvePart1(ProdInputPath);
Assert.Equal(4754955192, actual);
}
[Fact]
public void Part02_Test_equals_24()
{
var actual = _sut.SolvePart2(TestInputPath);
Assert.Equal(24, actual);
}
[Fact]
public void Part02_Test2_equals_30()
{
// todo: color edges as right, left, up, down to only allow rectangles between right and left or up and down edges
//var actual = _sut.SolvePart2(Test2InputPath);
//Assert.Equal(30, actual);
}
[Fact]
public void Part02_Prod_equals_1568849600()
{
var actual = _sut.SolvePart2(ProdInputPath);
Assert.Equal(1568849600, actual);
}
}