AdventOfCode 2023 Day01

This commit is contained in:
2023-12-01 18:23:53 +01:00
parent 52c9dab8a6
commit 4d8bfbb377
10 changed files with 1291 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
namespace AdventOfCode2023.Tests;
public class Day01_Tests
{
[Fact]
public void ResolvePart1__Example()
{
var day = new Day01();
string result = day.ResolvePart1(new string[] {
"1abc2",
"pqr3stu8vwx",
"a1b2c3d4e5f",
"treb7uchet",
});
Assert.Equal("142", result);
}
[Fact]
public void ResolvePart2__Example()
{
var day = new Day01();
string result = day.ResolvePart2(new string[] {
"two1nine",
"eightwothree",
"abcone2threexyz",
"xtwone3four",
"4nineeightseven2",
"zoneight234",
"7pqrstsixteen",
});
Assert.Equal("281", result);
}
}