Implemented Day02 part1 and part2 for 2026
This commit is contained in:
1 parent
dd9209f2d0
commit
0b712b18e4
2 files changed
+115
No files matched your search
@@ -0,0 +1,47 @@
|
||||
using AdvenOfCode.Contracts;
|
||||
|
||||
namespace AoC_2026.Tests;
|
||||
|
||||
public class Day02Test
|
||||
{
|
||||
private readonly IPuzzleSolver<long> _sut;
|
||||
private static readonly string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
private readonly string TestInputPath = @$"{rootPath}/AoC-PuzzleInputs/2026/Test/day02.txt";
|
||||
private readonly string ProdInputPath = @$"{rootPath}/AoC-PuzzleInputs/2026/Prod/day02.txt";
|
||||
|
||||
public Day02Test()
|
||||
{
|
||||
_sut = new Day02();
|
||||
}
|
||||
[Fact]
|
||||
public void Part01_Test_equals_16()
|
||||
{
|
||||
var actual = _sut.SolvePart1(TestInputPath);
|
||||
|
||||
Assert.Equal(16, actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Part01_Prod_equals_3415()
|
||||
{
|
||||
var actual = _sut.SolvePart1(ProdInputPath);
|
||||
|
||||
Assert.Equal(3415, actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Part02_Test_equals_32()
|
||||
{
|
||||
var actual = _sut.SolvePart2(TestInputPath);
|
||||
|
||||
Assert.Equal(32, actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Part02_Prod_equals_5467()
|
||||
{
|
||||
var actual = _sut.SolvePart2(ProdInputPath);
|
||||
|
||||
Assert.Equal(5467, actual);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user