Day03
This commit is contained in:
53
AdventOfCode2020.Tests/Day03_Tests.cs
Normal file
53
AdventOfCode2020.Tests/Day03_Tests.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using AdventOfCode2020;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace AdventOfCode2020.Tests
|
||||
{
|
||||
[TestClass()]
|
||||
public class Day03_Tests
|
||||
{
|
||||
[TestMethod()]
|
||||
public void ResolvePart1__Example()
|
||||
{
|
||||
IDay day03 = new Day03();
|
||||
|
||||
string result = day03.ResolvePart1(new string[] {
|
||||
"..##.......",
|
||||
"#...#...#..",
|
||||
".#....#..#.",
|
||||
"..#.#...#.#",
|
||||
".#...##..#.",
|
||||
"..#.##.....",
|
||||
".#.#.#....#",
|
||||
".#........#",
|
||||
"#.##...#...",
|
||||
"#...##....#",
|
||||
".#..#...#.#",
|
||||
});
|
||||
|
||||
Assert.AreEqual("7", result);
|
||||
}
|
||||
|
||||
[TestMethod()]
|
||||
public void ResolvePart2__Example()
|
||||
{
|
||||
IDay day03 = new Day03();
|
||||
|
||||
string result = day03.ResolvePart2(new string[] {
|
||||
"..##.......",
|
||||
"#...#...#..",
|
||||
".#....#..#.",
|
||||
"..#.#...#.#",
|
||||
".#...##..#.",
|
||||
"..#.##.....",
|
||||
".#.#.#....#",
|
||||
".#........#",
|
||||
"#.##...#...",
|
||||
"#...##....#",
|
||||
".#..#...#.#",
|
||||
});
|
||||
|
||||
Assert.AreEqual("336", result);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user