ex-aoc/AdventOfCode/AdventOfCode.Test/Day4Test.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
758 B
C#

namespace AdventOfCode.Test;
public sealed class Day4Test
{
[Fact]
public void Part1()
{
const string Input = "MMMSXXMASM\nMSAMXMSMSA\nAMXSXMAAMM\nMSAMASMSMX\nXMASAMXAMM\nXXAMMXXAMA\nSMSMSASXSS\nSAXAMASAAA\nMAMMMXMMMM\nMXMXAXMASX";
const int Expected = 18;
var day4 = new Day4();
var result = day4.Part1(Input);
Assert.Equal(Expected, result);
}
[Fact]
public void Part2()
{
const string Input = ".M.S......\n..A..MSMS.\n.M.S.MAA..\n..A.ASMSM.\n.M.S.M....\n..........\nS.S.S.S.S.\n.A.A.A.A..\nM.M.M.M.M.\n..........";
const int Expected = 9;
var day4 = new Day4();
var result = day4.Part2(Input);
Assert.Equal(Expected, result);
}
}