public void SumsTwoLines(string line, int expectedArea) { var d02 = new Day02(); var wholeArea = d02.CountAllAreas(line); Assert.That(wholeArea, Is.EqualTo(expectedArea)); }
public void RibbonLength(string line, int expectedLength) { var d02 = new Day02(); var length = d02.CountAllRibbons(line); Assert.That(length, Is.EqualTo(expectedLength)); }
public void Day02() { var d = new Day02(); Assert.AreEqual(643, d.ValidPasswordCount()); Assert.AreEqual(388, d.ValidPasswordCountV2()); }
public void Step2() { var rows = File.ReadAllLines(@"c:\code\aoc 2017\input_02.txt"); var indata = rows.Select(r => r.Split('\t').Select(t => int.Parse(t))); Console.WriteLine(Day02.Solve2(indata)); }
public void GetDay02Part01AnswerTest() { int expected = 569; int actual = Day02.GetDay02Part01Answer(); Assert.Equal(expected, actual); }
public void Setup() { SetInput(@"2x3x4 "); solver = new Day02(fileSystem, INPUT_FILE); }
public void Part1(string input, int expected) { var solver = new Day02(); var result = solver.Solve(input); result.ShouldBe(expected); }
public void Day02() { var d = new Day02(); Assert.AreEqual(5098658, d.Execute(12, 2)); Assert.AreEqual(5064, d.FindInputs(19690720)); }
public void ExamplePartII() { var day = new Day02(); var sequence = day.GetBathroomDesignCode(Input.Example); Assert.That(sequence, Is.EqualTo("5DB3")); }
public void GetDay2Part1AnswerTest() { BigInteger expected = 11590668; BigInteger actual = Day02.GetDay2Part1Answer(); Assert.Equal(expected, actual); }
public void Day02() { var day = new Day02(); Assert.Equal(51139, day.FirstPart()); Assert.Equal(272, day.SecondPart()); }
public void GetDay2Part2AnswerTest() { int expected = 2254; int actual = Day02.GetDay2Part2Answer(); Assert.Equal(expected, actual); }
public void Process_Test() { Assert.Equal(new[] { 2, 0, 0, 0, 99 }, Day02.Process(new[] { 1, 0, 0, 0, 99 })); Assert.Equal(new[] { 2, 3, 0, 6, 99 }, Day02.Process(new[] { 2, 3, 0, 3, 99 })); Assert.Equal(new[] { 2, 4, 4, 5, 99, 9801 }, Day02.Process(new[] { 2, 4, 4, 5, 99, 0 })); Assert.Equal(new[] { 30, 1, 1, 4, 2, 5, 6, 0, 99 }, Day02.Process(new[] { 1, 1, 1, 4, 99, 5, 6, 0, 99 })); }
public void Part2() { var expectedSolution = 346; var day2 = new Day02(); Assert.Equal(expectedSolution, day2.ExecutePart2()); }
public void Day02_Part2_Examples() { var d = new Day02(); Assert.AreEqual(34, d.SolutionPart2("2x3x4")); Assert.AreEqual(14, d.SolutionPart2("1x1x10")); }
public void Day02_Part1_Examples() { var d = new Day02(); Assert.AreEqual(58, d.SolutionPart1("2x3x4")); Assert.AreEqual(43, d.SolutionPart1("1x1x10")); }
public void Part2() { Day _day02 = new Day02("abcde\r\nfghij\r\nklmno\r\npqrst\r\nfguij\r\naxcye\r\nwvxyz"); string PartTwoExpected = "fgij"; Tuple <string, string> Actual = _day02.getResult(); Assert.AreEqual(PartTwoExpected, Actual.Item2); }
public void Part1() { Day _day02 = new Day02("abcdef\r\nbababc\r\nabbcde\r\nabcccd\r\naabcdd\r\nabcdee\r\nababab"); string PartOneExpected = "12"; Tuple <string, string> Actual = _day02.getResult(); Assert.AreEqual(PartOneExpected, Actual.Item1); }
public void Part02(string[] input, int expected) { // Act int actual = Day02.Part02(input); // Assert Assert.Equal(expected, actual); }
public void Y2020_Day02_IsPasswordValid_Returns_Correct_Value(string value, int policyVersion, bool expected) { // Act bool actual = Day02.IsPasswordValid(value, policyVersion); // Assert actual.ShouldBe(expected); }
public void TestPart1() { string[] input = new string[] { "abcdef", "bababc", "abbcde", "abcccd", "aabcdd", "abcdee", "ababab" }; Day02 day02 = new Day02(); Assert.Equal(12, day02.Part1(input)); }
public void Setup() { SetInput(@"1-3 a: abcde 1-3 b: cdefg 2-9 c: ccccccccc"); solver = new Day02(fileSystem, INPUT_FILE); }
public static void Y2017_Day02_ComputeDivisionOfEvenlyDivisible_Returns_Correct_Solution(int[] row, int expected) { // Act int actual = Day02.ComputeDivisionOfEvenlyDivisible(row); // Assert actual.ShouldBe(expected); }
public void Solve2() { var solver = new Day02(); var input = DataHelper.GetAllRows(2); var result = solver.Solve2(input); Output.WriteLine(result.ToString()); }
public void TestPart2() { string[] input = new string[] { "abcde", "fghij", "klmno", "pqrst", "fguij", "axcye", "wvxyz" }; Day02 day02 = new Day02(); Assert.Equal("fgij", day02.Part2(input)); }
public void Part2_TestOne() { var lines = new List <string> { "abcde", "fghij", "klmno", "pqrst", "fguij", "axcye", "wvxyz" }; Assert.AreEqual("fgij", Day02.GetCommonId(lines)); }
public void Part2() { var expected = 900; var day = new Day02(); var actual = day.Part2(_input); Assert.Equal(expected, actual); }
public async Task Y2019_Day02_RunProgram_Returns_Correct_State(string program, long[] expected) { // Act IReadOnlyList <long> actual = await Day02.RunProgramAsync(program, cancellationToken : CancellationToken.None); // Assert actual.ShouldBe(expected); }
public static void Y2016_Day02_GetBathroomCode_Returns_Correct_Solution_Alphanumeric(string[] instructions, string expected) { // Act string actual = Day02.GetBathroomCode(instructions, Day02.AlphanumericGrid); // Assert actual.ShouldBe(expected); }
public void Part1_TestOne() { var lines = new List <string> { "abcdef", "bababc", "abbcde", "abcccd", "aabcdd", "abcdee", "ababab" }; Assert.AreEqual(12, Day02.GetChecksum(lines)); }