ex-aoc/AdventOfCode/AdventOfCode.Test/Day3Test.cs
MarcUs7i 2e6b418fef AIO commit
Sorry for the late commit, forgot to commit and push it on Saturday 7th.
Thank god there are moodle reminders
2024-12-31 23:47:08 +01:00

28 lines
700 B
C#

namespace AdventOfCode.Test;
public sealed class Day3Test
{
[Fact]
public void Part1()
{
const string Input = "xmul(2,4)%&mul[3,7]!@^do_not_mul(5,5)+mul(32,64]then(mul(11,8)mul(8,5))";
const int Expected = 161;
var day3 = new Day3();
var result = day3.Part1(Input);
Assert.Equal(Expected, result);
}
[Fact]
public void Part2()
{
const string Input = "xmul(2,4)&mul[3,7]!^don't()_mul(5,5)+mul(32,64](mul(11,8)undo()?mul(8,5))";
const int Expected = 48;
var day3 = new Day3();
var result = day3.Part2(Input);
Assert.Equal(Expected, result);
}
}