AdventOfCode2024 Day02

This commit is contained in:
2024-12-02 08:21:07 +01:00
parent f8342dea26
commit a5173f623d
3 changed files with 1163 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
namespace AdventOfCode2024.Tests;
public class Day02_Tests
{
[Fact]
public void ResolvePart1__Example()
{
Day02 day = new();
string result = day.ResolvePart1([
"7 6 4 2 1",
"1 2 7 8 9",
"9 7 6 2 1",
"1 3 2 4 5",
"8 6 4 4 1",
"1 3 6 7 9",
]);
Assert.Equal("2", result);
}
[Fact]
public void ResolvePart2__Example()
{
Day02 day = new();
string result = day.ResolvePart2([
"7 6 4 2 1",
"1 2 7 8 9",
"9 7 6 2 1",
"1 3 2 4 5",
"8 6 4 4 1",
"1 3 6 7 9",
]);
Assert.Equal("4", result);
}
}